Help for this page

Select Code to Download


  1. or download this
    @res = qw/index.cgi/; # could be more than one file...
    @ext = qw/css tmp class edf/;
    $regex = '';    # note: "$", not "@"
    
  2. or download this
    perl -e '$_ = "hi"; print "ok\n" if ( /|x/ );
    
  3. or download this
    $string = "initial value";
    for ( @addons ) {
        $string .= " $_";   # or whatever
    }
    
  4. or download this
    my $ext_regex = '\.(' . join('|', qw/css tmp class edf/) . ')$';
    
    for ( @filenames ) {
       print "this one matches: $_\n" if ( /$ext_regex/i );
    }