perlrun -aF
[email protected] (Tor Hildrum)
| Newsgroups | perl.golf |
|---|---|
| Message-ID | <[email protected]> |
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",$_}@F'
does not.
tor% perl -aF'' -ne 'print map{unpack"B8",$_}@F'
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. :)