develooper Front page | perl.perl6.language | Postings from February 2004

Re: Exegesis 7: Overflow Fields

Thread Previous
From:
Damian Conway
Date:
February 29, 2004 16:54
Subject:
Re: Exegesis 7: Overflow Fields
Message ID:
404289D1.3060904@conway.org
> I also don't expect
> 
> $x = '';
> $y = "aaaa $x bbbb";
> 
> to assign '' to $y either, but that's the equlvalent of what you say
> form() will do.

I see your point.


> I was more worried about arrays of items some of which are empty strings
> and having items disappear out my repost because form() throws them
> away.

The behaviour is a little more sophisticated than I have hitherto tried to 
explain. Try this:

    use Perl6::Form;

    my @data = ("foo","bar","","baz");

     print form "| {[[[[[[[} |", \@data;

     print "====================\n";

     print map {form "| {[[[[[[[} |", $_} @data;


Damian

Thread Previous


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About