[EMAIL PROTECTED] wrote:
>> [EMAIL PROTECTED] wrote:
>> 
>>> Hi All,
>>> 
>>> The code below does what I want to do, but it takes 3 lines and a
>>> temporary array (yuck).  I can't come up with a one line regex
>>> substitution. Anyone got one? 
>>> 
>>> my $tmp = reverse split //, $_;
>>> $tmp =~ s/-//;
>>> $_ = reverse split //, $tmp;
>> 
>> can you post a sample string which you want to substitute..
> 
> sure.
> 
> Example record:
> 00000-00000-00000-EXAMPLE-000000-621
> 
        If this is the format then,
        s/\-(\d+)$/$1/;
        This assumes numerica as last portion before the end of the variable.

        Wags ;)

> Will become:
> 00000-00000-00000-EXAMPLE-000000621
> 
> - Peter
> 
> 
> 
> 
> 
> ****** CONFIDENTIALITY NOTICE ******
> NOTICE:  This e-mail message and all attachments transmitted with it
> may contain legally privileged and confidential information intended
> solely for the use of the addressee.  If the reader of this message
> is not the intended recipient, you are hereby notified that any
> reading, dissemination, distribution, copying, or other use of this
> message or its    
> attachments is strictly prohibited.  If you have received this
> message in 
> error, please notify the sender immediately and delete this message
> from your system.  Thank you.. 



*******************************************************
This message contains information that is confidential
and proprietary to FedEx Freight or its affiliates.
It is intended only for the recipient named and for
the express purpose(s) described therein.
Any other use is prohibited.
*******************************************************


--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to