You can't specify an empty -F parameter like that:

% perl5 -MO=Deparse -aF'' -ne 'print map{unpack"B8",[EMAIL PROTECTED]'
LINE: while (defined($_ = <ARGV>)) {
    our(@F) = split(" ", $_, 0);
    print map({unpack 'B8', $_;} @F);
}

Notice the split " " ...

Greg

-----Original Message-----
From: Tor Hildrum [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, November 11, 2003 5:47 PM
To: [EMAIL PROTECTED]
Subject: perlrun -aF


Hi there, I just have a little peculiarity that I am wondering about.

The following code works as expected:
#!/usr/bin/perl

while(<>)
{
     @F = split('');

     print map unpack("B8",$_),@F;
}

Test run:
tor% ./test.pl
abc
01100001011000100110001100001010*

BUT:
tor% perl -aF'' -ne 'print map{unpack"B8",[EMAIL PROTECTED]'
does not.

tor% perl -aF'' -ne 'print map{unpack"B8",[EMAIL PROTECTED]'
abc
01100001

Doesn't autosplit or -F work as described in perlrun?

Tried both Perl 5.005_03 and 5.8

Tor

* Need to add some spaces, but haven't figured out any
decent method yet. :)


------------------------------------------------------------------------------
This message is intended only for the personal and confidential use of the
designated recipient(s) named above.  If you are not the intended recipient of
this message you are hereby notified that any review, dissemination,
distribution or copying of this message is strictly prohibited.  This
communication is for information purposes only and should not be regarded as
an offer to sell or as a solicitation of an offer to buy any financial
product, an official confirmation of any transaction, or as an official
statement of Lehman Brothers.  Email transmission cannot be guaranteed to be
secure or error-free.  Therefore, we do not represent that this information is
complete or accurate and it should not be relied upon as such.  All
information is subject to change without notice.

Reply via email to