mikejones has asked for the wisdom of the Perl Monks concerning the following question:
Is there a regexp way or "better way" I only want string up to "." starting from left. thank you$ perl -le 'my @val= split(/\./,"foo.bar.aaa"); print @val[0];' foo
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: split...or better?
by zwon (Abbot) on Feb 20, 2009 at 16:47 UTC | |
|
Re: split...or better?
by educated_foo (Vicar) on Feb 20, 2009 at 17:24 UTC | |
|
Re: split...or better?
by suaveant (Parson) on Feb 20, 2009 at 16:48 UTC | |
|
Re: split...or better?
by bruno (Friar) on Feb 20, 2009 at 16:49 UTC | |
|
Re: split...or better?
by kennethk (Abbot) on Feb 20, 2009 at 16:55 UTC | |
|
Re: split...or better?
by codeacrobat (Chaplain) on Feb 20, 2009 at 18:04 UTC |