Little shorter version (sorry, couldn't resist my perlgolfer soul...) - maybe you will find it useful.
#!perl -l use strict; use warnings; use Data::Dumper; my @data = <DATA>; my $string = join" ", @data; for(@data) { my @array = split; print Dumper(@array); } __DATA__ Port Alias Oper Admin Speed Duplex Type (truncated) Status Status (bps) ------------ ---------------- -------- ------- ------ ------- -------- +---------- vlan.0.4094 up up other host.0.1 up up 10.0M other ge.1.1 down up 10.0M half 10-t + rj45 ge.1.2 down up 10.0M half 10-t + rj45 ge.1.3 down up 10.0M half 10-t + rj45 ge.1.4 down up 10.0M half 10-t + rj45 ge.1.5 down up 10.0M half 10-t + rj45
But I do not know where you get empty column. I have run it, but I don't see any empty variables...
In reply to Re: regex help
by grizzley
in thread regex help
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |