Help for this page

Select Code to Download


  1. or download this
    my %files = ( colors => 'colors.dat',
                  tests  => 'test.txt',
    ...
    
    open IN, "<$filepath/$files{$siteinfo[1]}" or
        someErrorRoutine( "Can't open $filepath/$siteinfo[1] for reading: 
    +$!" );
    
  2. or download this
     
    $siteinfo[1] =~ /^[^.]+/(\w+\.\w+)$/ or
        someErrorRoutine( "Regex failed" );
    my $fileToOpen = $1; # $fileToOpen untainted