Mailing List Archive


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [tlug] "Knoppix Boot Options . . ." ~= m/knoppix/troll/



On 06/06/07, Stephen J. Turnbull <stephen@example.com> wrote:

P.S.  Don't run that perl without an audit, it's probably a virus.  At
least, I felt sick after writing it.

: jglover@example.com; perl -e 'use strict; use warnings; my $foo = "barf"; $foo = s/f$//;' Use of uninitialized value in substitution (s///) at -e line 1. : jglover@example.com; perl -e 'use strict; use warnings; my $foo = "barf"; $foo = s/f$//;' : jglover@example.com; perl -e '"Knoppix Boot Options . . ." ~= m/knoppix/troll/' Bareword found where operator expected at -e line 1, near "m/knoppix/troll" syntax error at -e line 1, near ""Knoppix Boot Options . . ." ~" Execution of -e aborted due to compilation errors.

Damn you!

I think you meant:

my $subject = "Knoppix Boot Options . . .";
$subject =~ s/knoppix/troll/i;
print "$subject\n";

But to be fair, if I tried to write that same code in Python, I doubt
it would compile either. :)

-josh


Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links