Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
sub save{ print "Please specify a file name: "; chomp(my $file=uc<STDIN>); chomp(my $cwd = `pwd`); open ($file, "$cwd//Pandoras Box//>>$file.txt\n") || die "Could not sa +ve file: $!\n"; print $file "cont\n" || die "Could not write to file: $!\n"; print "File has been saved to Pandora's Box successfully!\n\n" || die +"Write fail: $!\n"; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Changing directories
by pc88mxer (Vicar) on May 07, 2008 at 17:56 UTC | |
|
Re: Changing directories
by TGI (Parson) on May 07, 2008 at 17:58 UTC | |
|
Re: Changing directories
by Anonymous Monk on May 07, 2008 at 17:53 UTC |