A
Arun
This is the code that I am using to create the file and am
failing.Please help.
thanks
#!/opt/bin/perl -wT
use strict;
use IO::File;
$file = "$ENV{'PWD'}" . "$ENV{'PATH_INFO'}";
$tmp = $file . ".tmp";
$tmp =~ s/\//@/g; # make a unique tmp file name from the path
$tmp = "/tmp/$tmp";
$fh = IO::File->new("> $tmp")
or die "Couldn't open $tmp for writing: $!\n";
while (<STDIN>)
{
if(defined $fh)
{
print $fh "$_\n";
}
}
$fh->close;
failing.Please help.
thanks
#!/opt/bin/perl -wT
use strict;
use IO::File;
$file = "$ENV{'PWD'}" . "$ENV{'PATH_INFO'}";
$tmp = $file . ".tmp";
$tmp =~ s/\//@/g; # make a unique tmp file name from the path
$tmp = "/tmp/$tmp";
$fh = IO::File->new("> $tmp")
or die "Couldn't open $tmp for writing: $!\n";
while (<STDIN>)
{
if(defined $fh)
{
print $fh "$_\n";
}
}
$fh->close;