Frank McCollum wrote:
> 
> From: John W. Krahn [mailto:[EMAIL PROTECTED]]
> > 
> > Herb Martin wrote:
> > >
> > > > s/%//;  # replaces any '%' signs in $_ with nothing
> > > >
> > > > but, I want to replace any '%' signs in
> > > > $iAmAVariableHearMeRoar with nothing
> > >
> > > (Correct) Answer given by another poster:
> > > >> $iAmAVariableHearMeRoar =~ s/%//;
> > >
> > > The original message did IMPLY there might be MULTIPLE
> > > '%' characters (perhaps not together.)
> > >
> > > If THIS is the REAL request, try this:
> > >
> > > $iAmAVariableHearMeRoar =~ s/%//g;
> > >
> > > g = "globally" (or multiple patterns where found.)
> > 
> > Or if you want to do it more efficiently (the string is really long.)
> > 
> > $iAmAVariableHearMeRoar =~ tr/%//d;
> 
> related question:  I want to strip out any '*' symbols as well, and replace
> them with a zero.  So, I changed my code to reflect:
> 
> $origFee =~ s/[%\*]/0/;
> 
> It appears that it strips out the % successfully, but anywhere I have a '*'
> symbol just gets overlooked.  Any thoughts?


$origFee =~ tr/*%/0/d;



John
-- 
use Perl;
program
fulfillment

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to