"no such file" ?
Milan Sorm
xsorm na informatics.muni.cz
Pátek Říjen 2 18:30:31 MEST 1998
Rostislav Matl Fri, Oct 02, 1998 at 06:27:15PM +0200 pise:
> Mam adresat s takto pojmenovanymi soubory:
> get?s=56602
> get?s=56603
> get?s=56604
> get?s=56605
> ..
>
> a rad bych s nimi neco udelal.
> Snazim se je proto ve smycce podle zadanych argumentu projit,
> dostvam vsak vytrvale zpravu:
> "ERROR: No such file or directory: get?s=55602"
>
> Co jsem prehledl ?
>
> Kod meho skriptu:
>
> #!/usr/bin/perl -w
> $start = $ARGV[0];
> $stop = $ARGV[1];
>
> for ($i=$start; $i <= $stop; ++$i) #smycka pres soubory
> {
> my $file_name = "get?s=$i";
> open(FILE,"$file_name") || die "ERROR: $!: $file_name\n";
> print "---------- $file_name ----------\n";
> close(FILE);
> }
zkus "get\?s=$i";
milan
>
> +-----------------------------------------------------------------------------+
> | ROSTISLAV MATL, student of Masaryk University - Faculty of Informatics |
> | e-mail: xmatl na fi.muni.cz WWW: http://www.fi.muni.cz/~xmatl/index.html |
> | ICQ#: 17058749 |
> +-----------------------------------------------------------------------------+
-------------------------------------------------------------
Milan Sorm (aka John Popelnik) telefon: +420 5 41512348
FI MU, Botanicka 68a, Brno sorm na informatics.muni.cz
http://www.fi.muni.cz/~sorm/ tel. domu: (05) 46211083
fingerprint: E4 78 1D A7 C5 2C F5 3F 83 A7 97 29 73 F7 17 63
Další informace o konferenci Perl