Help for this page

Select Code to Download


  1. or download this
    #!/usr/bin/perl
    
    ...
    $str = 'ASdf';
    
    if ( 'asdf' =~ /$str/$icase ) { print "it works!\n" }
    
  2. or download this
    $ 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.