Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Perl has failed me /sadpanda.png

Name: Anonymous 2007-07-31 16:59 ID:oPzZQth4

So, I have this script, but it doesn't work (syntax error), it's obviously because Perl sux... But, maybe you can fix it? Or maybe it even works for you?

#!/usr/bin/perl

use Switch;

print (10 / 2) ."\n";

while (<>)
{
    switch ($_)
    {
        case (/^EXIT\n$/i)
        {
            exit 0;
        }
        else
        {
            print $_;
        }
    }
}

Name: Anonymous 2007-08-01 1:02 ID:rOf/Thr4

>>1
This does what your code would do without the bug
print 5;$_=<>;/^EXIT\n$/i?exit 0:print;

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List