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"; }
In reply to Changing directories by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |