splitOnce has asked for the wisdom of the Perl Monks concerning the following question:
I want to only get the first word in this line , in this case it is Here and ignore the rest : this seems to work but , I am sure there is a cleaner way :Here:\: => M:\p_sold-cr_q00457655_EFLT
thanks$word =~ s/\:\\\:\s+\=\>\s+\w+\:\w*\\\w*//;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: matching in a line
by fireartist (Chaplain) on Aug 01, 2002 at 20:04 UTC | |
|
Re: matching in a line (without destruction)
by BigLug (Chaplain) on Aug 02, 2002 at 02:38 UTC | |
|
Re: matching in a line
by Jaap (Curate) on Aug 01, 2002 at 19:59 UTC |