Re: Modification of a read-only value attempted

2003-10-16 Thread Jeff 'japhy' Pinyan
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//

Modification of a read-only value attempted

2003-10-16 Thread Rajat Garg
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

RE: Modification of a read-only value attempted

2003-08-15 Thread Scott Taylor
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

RE: Modification of a read-only value attempted

2003-08-15 Thread Bob Showalter
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

Modification of a read-only value attempted

2003-08-15 Thread Scott Taylor
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