in reply to cgi question
You're going through it only twice, assigning what you captured in the regex to $GU_web twice, and printing $GU_web only once.$i=1; while (<info_web>) { if (/^(\d+\.\d+)\D/) {$GU_web = $1;} if ($i >1) { last;} print "$GU_web\n"; $i++; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: cgi question
by Anonymous Monk on Jun 03, 2005 at 13:53 UTC | |
by Tomtom (Scribe) on Jun 03, 2005 at 14:19 UTC |