in reply to read text table

The task depends highly on the type of data you can see -- based on what you have shown, there are very specific columns in which you find the data you want, so unpack would be a useful extractor. (You also might consider split or regular expressions).
#!/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"; }