If you're specifically interested in just the first 16 characters, you could also look into substr( EXPR, OFFSET, LENGTH). When I saw "host1 BUNCHOFDATAONALINE" I assumed that splitting on whitespace was what you were looking for, but when you phrase it as "one being the first 16 characters", substr comes to mind.
You may wish to examine the differences between split and substr to see which would suit you better.
--chargrill
$/ = q#(\w)# ; sub sig { print scalar reverse join ' ', @_ }
+ sig
map { s$\$/\$/$\$2\$1$g && $_ } split( ' ', ",erckha rlPe erthnoa stJu
+" );
| [reply] [d/l] [select] |
ok, on the split function, can i split $line into two sections, one being the first 16 characters, then name the file via this string of characters?
Yes, you can, but then chances are that substr or unpack are better suited for the tast. Split works best for splitting on a pattern. Well, more precisely it is exactly for splitting on a pattern!
| [reply] |