Joel wrote: > > This is a precursor to a real JAPH signeture (I need to learn more perl > before I can write a really obfuscated one), and I have already gotten it to > print what it was supposed to, but I changed print chr($letter); to print > chr(@word); to see if it would work, which is when I got the happy face > output in perl. Any ideas? > (By the way, I haven't fixed the while loop yet so be ready to quit fast to > read the output.) > > Joel > > #!usr/bin/perl > > use Warnings; > use Strict; > > my $h=4; > my @word = (0x4E, 0x65, 0x72, 0x64); > while ($h > 0) { > $h++; > $letter=shift @word; > print chr(@word); > }
Hmm. I'm don't think I should be encouraging anybody to write obfuscated Perl. Almost nobody does it well - including me. Why are you /incrementing/ $h from four until it's greater than zero? Your bug is that chr() forces its parameter into scalar mode, so that your output will be "\03\02\01\0\0\0\0\0\0" Although your capitalised pragma could almost be seen as divisive: there's neither a 'Warnings' nor a 'Strict', so you're practising unprotected unintentional obfuscation. Write Perl well first. Please. Then write somthing clever. Rob -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>