in reply to [SOLVED] Troubles with building a hash slice
You almost certainly want something like:
my @data_from = $tmpline =~ m/ \s*(\d+) ;;(.+) ;;\s*(\d+) ;;\s*(\d+) ;;\s*(\d+) ;;\s*(\d+) ;;\s*(\d+) ;;\s*(\d+) ;;\s*(\d+) ;;(.+?) \s*;;\s*(.*?) \s*;;\s*(\d+) ;;(.+)\s* /x;
That is, use a m// and assign the captures directly to @data_from instead of using s/// and converting it to a string containing the captures which is not an array. You;d need to split it, but that would be pointless.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Troubles with building a hash slice
by CrazyDiamond (Initiate) on Jan 16, 2008 at 12:37 UTC |