And This is the output. the file isn't modifying.use strict; my $file = 'names.txt'; # Name the file open(INFO, "$file"); # Open for appending $" = "\#"; my @lines = <INFO>; # Read it into an array print INFO "@lines"; close(INFO); # Close the file open(INFO1, "$file"); # Open the file @lines = <INFO1>; # Read it into an array close(INFO1); # Close the file print @lines; # Print the array
Please Advise.D:\Perl_Samples>perl file_Modify.pl Alpha Beta Chi Delta Epsilon
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |