> I have this list I've read into an array line by line:
> tty 81 bcain Async 01:18:35 00:02:55
> tty 83 dnguyen Async 00:20:27 00:01:13
> tty 85 cmandeville \
> Async 03:26:22 00:00:58
> tty 88 twooten Async 02:00:36 00:00:30
> tty 89 jwaters Async 00:13:37 00:00:32
> tty 95 epastoriza Async 00:45:29 00:00:00
>
>
> The line starting with tty 85 is continued on the line after it so I'd
> like to join them and close up the array. Any suggestions?
Something like:
@b = map { /\\$/ and $h=$_, undef or $_=$h.$_, undef $h, $_ } @a;
I haven't tested this; you may need to play with brackets to ensure
correct precedence.
map does the bit of code in {} for each element of @a. before
the {} block starts each time, $_ is set to the element of @a.
the result of the {} is added to @b.
gotta run.
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]