in reply to Parsing Variables
Now, personally, I think your table will turn out kind of odd... you're making three cells just for the date, and the "still logged in" will be lined up funny against the logout timespans. To fix this would best be served by parsing the rows with a regular expression instead of split, but this is a start.my @rows = split /\n/, $input; foreach my $row (@rows) { print "<TR>\n"; my @columns = split / /, $row; foreach my $column (@columns) { print "<TD>$column</TD>\n"; } print "</TR>\n"; }
Update: Added 'my' keywords to match your 'use strict'. Glad to see newcomers learning discipline.
--
[ e d @ h a l l e y . c c ]
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Parsing Variables
by EvdB (Deacon) on Jun 14, 2003 at 12:19 UTC |