jar00n has asked for the wisdom of the Perl Monks concerning the following question:
Which when ran produces this:#!/usr/bin/perl $icase = 'i'; $str = 'ASdf'; if ( 'asdf' =~ /$str/$icase ) { print "it works!\n" }
$ perl test.pl Scalar found where operator expected at test.pl line 6, near "/$str/$i +case" (Missing operator before $icase?) syntax error at test.pl line 6, near "/$str/$icase " Execution of test.pl aborted due to compilation errors.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Can you use a scaler as an operator?
by hippo (Archbishop) on Jan 22, 2014 at 10:04 UTC | |
by AnomalousMonk (Archbishop) on Jan 23, 2014 at 00:12 UTC | |
by jar00n (Novice) on Jan 22, 2014 at 21:28 UTC | |
|
Re: Can you use a scaler as an operator?
by Eily (Monsignor) on Jan 22, 2014 at 10:06 UTC |