You can use a single expression like bart showed, but I find the following easier to understand (and maintain):
# Seperate the fields. my @feeder_line = split /\s+/; # Clean up the data: # Remove the brackets from the 2nd and 3rd fields. foreach (@feeder_line[1, 2]) { s/^\[//; s/\]$//; }
In reply to Re: Split using multiple conditions
by ikegami
in thread Split using multiple conditions
by juo
For: | Use: | ||
& | & | ||
< | < | ||
> | > | ||
[ | [ | ||
] | ] |