in reply to read text table
#!/usr/bin/perl use warnings; use strict; do { $_ = <> } until /Bus Timetable/; <> for (1..3); # skip titles 3 lines while (<>) { last if /^\+/; my ($from, $dept, $to, $arr) = unpack('x23a3x3a4x3a3x2a4', $_); print "$from$dept:$to$arr\n"; }
|
|---|