Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
it gives me error on third line where I try to open that outputfile.Is there any way I can create file when I run the program.Any Suggestion.Thanx#!/usr/bin/perl $Inputfile='filename'; open (IN,"<$Inputfile") or die "cannot open file: $!\n"; open (OUT, "+<$inputfile.out") or die "cannot open file: $!\n"; while (<IN>){ .... ..... print OUT; #print to $Inputfile.out file } #do something with content of $Inputfile.out
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
(tye)Re: Creating file at run time
by tye (Sage) on Nov 23, 2000 at 00:06 UTC | |
|
Re: Creating file at run time
by kilinrax (Deacon) on Nov 22, 2000 at 23:57 UTC | |
|
Re: Creating file at run time
by mrmick (Curate) on Nov 23, 2000 at 00:00 UTC | |
|
(crazyinsomniac) Re: Creating file at run time
by crazyinsomniac (Prior) on Nov 22, 2000 at 23:57 UTC | |
|
Re: Creating file at run time
by steveAZ98 (Monk) on Nov 22, 2000 at 23:57 UTC | |
|
Re: Creating file at run time
by arturo (Vicar) on Nov 22, 2000 at 23:57 UTC |