ZHAO, BING wrote:
Hi,
unlink $file works fine, but link $file doesn't even
exist,
link() does exist, but it corresponds to link(2) syscall.
perldoc -f link
The sysopen function seems to be tedious, does anyone
know how to effectively create a file in some
ZHAO, BING wrote:
Hi,
unlink $file works fine, but link $file doesn't even
exist,
Did you search seacrh.cpan.org for "link"?
How about "touch"?
if you had you'd have found this right off:
http://search.cpan.org/~nwetters/File-Touch-0.01/Touch.pm
Also
perldoc -f open
op
> Cc: ZHAO, BING; [EMAIL PROTECTED]; beginners@perl.org
> Subject: Re: PS what is the correct/efficient function to
> create a file
>
>
> You could always use Shell module.
>
> > Hi,
> >unlink $file works fine, but link $file doesn't
> >
You could always use Shell module.
Hi,
unlink $file works fine, but link $file doesn't even
exist,
The sysopen function seems to be tedious, does anyone
know how to effectively
create a file in some directory in perl?
--
To unsubscribe, e-mail: [EMA
I think people have been pretty clear. the open() function is the
standard function for creating files.
##
open(OUTFILE,">my_file.txt") or die("Couldn't open 'my_file.txt' for
writing!\n";
foreach(1..1001){
print OUTFILE $_;
}
close OUTFILE;
###