On Oct 16, Rajat Garg said:
>($1, $2) = split(/=/,$i);
You can't assign to the $ variables. Choose different variable
names.
--
Jeff "japhy" Pinyan [EMAIL PROTECTED] http://www.pobox.com/~japhy/
RPI Acacia brother #734 http://www.perlmonks.org/ http://www.cpan.org/
what does y//
Hi ,
I am getting this error. Kindly help.
The file is having 777 permissions.
$LANGUAG = "/etc/sysconfig/i18n";
open (LNG, "$LANGUAG") || die("Cannot open file /etc/sysconfig/i18n");
@langfile = ;
foreach $i (@langfile)
{
($1, $2) = split(/=/,$i);
print $1;
print $2;
}
close(LNG);
Regards,
Ra
E,$DRVPHONE,$DRVTRKID,$DRVLEASEOP) =
> split(/,/,$_); ...
>}
> }
>
> the "while(){" line returns this message:
>
> Modification of a read-only value attempted
Your outer foreach() loop uses $_ as the loop variable. Inside the loop, $_
is an alias for the value being
t;;
>system "rcp orion:/u1/syncdata/drvdat.$co_id
> /tmp/drv.temp" || next;
>
>open(InFile, "/tmp/drv.temp") || die "No such file: $!\n";
> while(){ chomp;
> my ($DRVID,$DRVNAME,$DRVPHONE,$DRVTRKID,$DRVLEASEOP) =
> split
p" || next;
open(InFile, "/tmp/drv.temp") || die "No such file: $!\n";
while(){
chomp;
my ($DRVID,$DRVNAME,$DRVPHONE,$DRVTRKID,$DRVLEASEOP) = split(/,/,$_);
...
}
}
the "while(){" line returns this message:
Modification of a read-only va