ulaksh has asked for the wisdom of the Perl Monks concerning the following question:
please let me know where I am doing the mistakeuse strict; use warnings; open my $fo, '+>>', "outfile.txt" or die "Error:$!\n"; print $fo "how r u\n"; print $fo "hey suresh their\n"; print $fo "in bangalore\n"; while (my $line = <$fo>){ print "$line"; my $a =substr ($line, "suresh"); print "$a\n"; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: write and read the same file not display the output
by Kenosis (Priest) on Sep 04, 2012 at 23:47 UTC | |
by ulaksh (Acolyte) on Sep 05, 2012 at 00:53 UTC | |
by Rudolf (Pilgrim) on Sep 05, 2012 at 01:53 UTC | |
by Kenosis (Priest) on Sep 05, 2012 at 02:07 UTC | |
by Rudolf (Pilgrim) on Sep 05, 2012 at 03:08 UTC | |
| |
|
Re: write and read the same file not display the output
by Marshall (Canon) on Sep 05, 2012 at 04:21 UTC | |
|
Re: write and read the same file not display the output
by choroba (Cardinal) on Sep 04, 2012 at 22:44 UTC |