in reply to array substr or what?

A '|' or pipe is an 'or' in a regex. Escape it in your split.
erickn@isfe:/home/erickn> cat x use Data::Dumper; $record = 'one|two|three|4|5|six'; print "$record\n"; @record = split /\|/, $record; print Dumper \@record;
erickn@isfe:/home/erickn> perl x one|two|three|4|5|six $VAR1 = [ 'one', 'two', 'three', '4', '5', 'six' ];

Replies are listed 'Best First'.
Re^2: array substr or what?
by Anonymous Monk on Apr 06, 2005 at 00:19 UTC
    Oh Man!
    I thought I *had* escaped it in one of my many trials (and errors).

    That did the trick. THANK YOU!

    PerlMonks Rule!

    Susan