-Original Message-
From: Umesh T G [mailto:[EMAIL PROTECTED]
Sent: Friday, May 19, 2006 8:54 AM
To: Perl Beginners
Subject: Grep a variable
Hi List,
I am trying to grep a variable from a scalar value. Here is the
example
below.
$var = mydisk;
$line = mydisk is bad;
if
* Umesh T G [EMAIL PROTECTED] [2006-05-19T08:54:17]
I am trying to grep a variable from a scalar value. Here is the example
below.
$var = mydisk;
$line = mydisk is bad;
if (grep/\$var/,$line) {
print disk is not bad;
}
The simplest answer, already given, is that you should lose the
On 5/19/06, Umesh T G [EMAIL PROTECTED] wrote:
Hi List,
I am trying to grep a variable from a scalar value. Here is the example below.
$var = mydisk;
$line = mydisk is bad;
if (grep/\$var/,$line) {
print disk is not bad;
}
[snip]
TIA,
Cheers,
Umesh
As others have pointed out, get