Hi Irfan,
Irfan J Sayed (isayed) wrote:
if (grep /^$rel1$/, @test)
{
print "Result = $rel1\n";
}
but i think this is not the proper way because if i use grep then it
would be a platform dependant.
The grep you are using is not the grep provided by the operating system,
but the Perl function grep. (See:
http://perldoc.perl.org/functions/grep.html). Note that executing grep
with backticks, system, etc:
`grep ...` or system ("grep ...")
invokes the *program* grep which would be system dependent. What you
are using is the function in Perl (which fortunately or unfortunately,
has the same name -- that is probably what makes it confusing...).
Ray
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/