Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
Error message says "Can't open file". Any help. Thanks.#!/usr/bin/perl -w opendir(TEST, "test") or die "Can't open dir\n"; @testfiles = readdir (TEST); closedir(TEST); foreach $testfiles(@testfiles){ open(FILE, "test/$testfiles") or die "can't open file"; while ($line = <FILE>){ if ($line =~ /mods=[0-9][0-9]/){ $line =~ s/mods=[0-9][0-9]//; printf FILE $line; }; } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: BAsic File I/O
by dga (Hermit) on Aug 21, 2001 at 01:50 UTC | |
|
Re: BAsic File I/O
by blakem (Monsignor) on Aug 21, 2001 at 01:45 UTC | |
|
Re: BAsic File I/O
by tachyon (Chancellor) on Aug 21, 2001 at 06:28 UTC | |
|
Re: BAsic File I/O
by Cine (Friar) on Aug 21, 2001 at 15:09 UTC |