Hi Singam,
Your question is not clear. Take a look at How (Not) To Ask A Question.
Also always use use strict, use warnings. If i understood your question correctly, here is my try
use strict; use warnings; #my $filename = "<test.txt"; #example 1 #my $filename = ">test.txt"; #example 2 #my $filename = ">>test.txt"; #example 3 my $filename = "|test.txt"; if ($filename =~ /^\|\s*test/ ) { print "\npipefront\n"; } elsif ($filename =~ /test\.txt\s*\|$/ ) { print "\npipeend\n"; }
Prasad
In reply to Re: searching the strings
by prasadbabu
in thread searching the strings
by singam
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |