- or download this
#! c:\perl\bin
print("Enter filename to open (text only):\n\n");
- or download this
use strict;
use warnings;
- or download this
$in=<STDIN>;
chomp $in;
...
{
$in.=".txt";
}
- or download this
chomp(my $in=<STDIN>);
$in .= '.txt' unless $in =~ /\.txt$/i;
- or download this
open ($in, "$in") or die("$in could not be opened:$!\n");
- or download this
open my $infh, '<', $in or die "$in could not be opened:$!\n";
- or download this
s/\band\b/$word/ig;
...
{
++$count;
}