in reply to Re: Using expressions in arrays for pattern matching
in thread Using expressions in arrays for pattern matching
What about names like "my.file.rpt" (pretty common style on *nix)?my $thisout = substr($i, 0, index($i, ".")) . ".txt"
Since we are already through with $i (let's call it $file from now on), we can do:
$file =~ s/\.rpt$/.txt/i; #case insensitive open OUTPUT, ">$file";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: Using expressions in arrays for pattern matching
by melora (Scribe) on Dec 02, 2003 at 00:22 UTC |