Bugz has asked for the wisdom of the Perl Monks concerning the following question:
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
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Using $"
by toolic (Bishop) on Dec 22, 2014 at 19:35 UTC | |
by Bugz (Acolyte) on Dec 22, 2014 at 19:57 UTC | |
by Lotus1 (Vicar) on Dec 22, 2014 at 20:10 UTC | |
by Bugz (Acolyte) on Dec 22, 2014 at 20:02 UTC | |
|
Re: Using $"
by LanX (Saint) on Dec 22, 2014 at 20:09 UTC | |
by BillKSmith (Monsignor) on Dec 22, 2014 at 23:46 UTC | |
by Bugz (Acolyte) on Dec 22, 2014 at 20:21 UTC | |
by 2teez (Vicar) on Dec 22, 2014 at 20:31 UTC | |
by LanX (Saint) on Dec 22, 2014 at 21:41 UTC | |
by soonix (Chancellor) on Dec 25, 2014 at 07:57 UTC | |
|
Re: Using $"
by GrandFather (Saint) on Dec 22, 2014 at 21:45 UTC | |
|
Re: Using $"
by Anonymous Monk on Dec 22, 2014 at 20:15 UTC |