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)$/;
In reply to Re^3: write and read the same file not display the output
by Rudolf
in thread write and read the same file not display the output
by ulaksh
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |