rsiedl has asked for the wisdom of the Perl Monks concerning the following question:
I would like to have the @names array as well as another array like:#!/usr/bin/perl use strict; use warnings; my $blah = "reagen OR siedl OR smith AND jack"; my (@names) = split(/\sAND\s|\sOR\s/, $blah); print $_, "\n" foreach (@names); exit;
cheers,@split_values = [ OR, OR, AND ];
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: using split
by brian_d_foy (Abbot) on Nov 17, 2006 at 08:09 UTC | |
|
Re: using split
by rinceWind (Monsignor) on Nov 17, 2006 at 11:24 UTC | |
|
Re: using split
by jwkrahn (Abbot) on Nov 17, 2006 at 10:40 UTC | |
|
Re: using split
by smokemachine (Hermit) on Nov 17, 2006 at 11:42 UTC |