Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
When I execute this, GB becomes "jsdjsjsj" and not that and whatever was pushed into it. What could I be doing wrong?@gb = <GB>; #where GB is a guestbook html file @gb2 = ("jsdjsjsj"); foreach $line(@bg){ push(@gb2,$line); if($line =~ /INSERT_NEW_ENTRY/){ push(@gb2,"<b>entry</b> $FORM{'whatever'}"); } } seek(GB,0,0); truncate(GB,0); print GB @gb2;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: pushing
by davorg (Chancellor) on Dec 30, 2000 at 18:29 UTC | |
by pawel_guz (Novice) on Dec 30, 2000 at 18:38 UTC | |
by davorg (Chancellor) on Dec 30, 2000 at 18:45 UTC | |
by pawel_guz (Novice) on Dec 30, 2000 at 18:50 UTC | |
by davorg (Chancellor) on Dec 30, 2000 at 18:56 UTC | |
by extremely (Priest) on Dec 31, 2000 at 12:11 UTC | |
|
Re: pushing
by lhoward (Vicar) on Dec 30, 2000 at 18:36 UTC | |
by pawel_guz (Novice) on Dec 30, 2000 at 18:44 UTC | |
by davorg (Chancellor) on Dec 30, 2000 at 18:48 UTC | |
by dws (Chancellor) on Dec 31, 2000 at 11:22 UTC | |
|
Re: pushing
by jeroenes (Priest) on Dec 30, 2000 at 18:48 UTC |