in reply to Re^2: write and read the same file not display the output
in thread write and read the same file not display the output
Hello ulaksh, Im guessing youve commented out your print "$_"; on purpose there. Anyway your getting yelled at because when the regex doesnt make a match, $a is not getting defined at all, so it is still undefined. You then try to use it on the next line print $a; You cant print $a because it has no value. It is undefined at the moment. This is also the reason your not getting anything printed to screen. maybe you can try this instead? :
print $1 if /^($name)$/;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: write and read the same file not display the output
by Kenosis (Priest) on Sep 05, 2012 at 02:07 UTC | |
by Rudolf (Pilgrim) on Sep 05, 2012 at 03:08 UTC | |
by Kenosis (Priest) on Sep 05, 2012 at 04:53 UTC | |
by Rudolf (Pilgrim) on Sep 05, 2012 at 13:09 UTC |