Re: getting the number of characters

2003-03-13 Thread John W. Krahn
Janek Schleicher wrote: > > Frank Wiles wrote at Wed, 12 Mar 2003 10:14:16 -0600: > > > If you're wanting to find the last digit in a scalar, you'll want to > > modify this to be: > > > > ($match) = $num =~ /(\d)$/; > > > > or if there is always there characters you can also do th

Re: getting the number of characters

2003-03-13 Thread Janek Schleicher
Frank Wiles wrote at Wed, 12 Mar 2003 10:14:16 -0600: > If you're wanting to find the last digit in a scalar, you'll want to > modify this to be: > > ($match) = $num =~ /(\d)$/; > > or if there is always there characters you can also do this: > > ($match) = $num =~ /\d\d(

RE: getting the number of characters

2003-03-12 Thread Wagner, David --- Senior Programmer Analyst --- WGO
David Gilden [mailto:[EMAIL PROTECTED] >> Sent: Wednesday, March 12, 2003 5:09 PM >> To: [EMAIL PROTECTED] >> Subject: getting the number of characters >> >> >> Hello, >> >> I am looking for the $num to treated as a string and get the >> num

RE: getting the number of characters

2003-03-12 Thread NYIMI Jose (BMB)
L PROTECTED] > Subject: getting the number of characters > > > Hello, > > I am looking for the $num to treated as a string and get the > number of characters, in this case I am look for 3 to be returned. > > Later I want to use this number to pad a string with

Re: getting the number of characters

2003-03-12 Thread Frank Wiles
.--[ David Gilden wrote (2003/03/12 at 10:08:52) ]-- | | Hello, | | I am looking for the $num to treated as a string and get the number | of characters, in this case I am look for 3 to be returned. | | Later I want to use this number to pad a string with zeros | Than

Re: getting the number of characters

2003-03-12 Thread Pete Emerson
The length() function is what you need. print length($num), "\n"; Mar 12, 2003 at 10:08am from David Gilden: DG> I am looking for the $num to treated as a string and get the number of characters, -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

getting the number of characters

2003-03-12 Thread David Gilden
Hello, I am looking for the $num to treated as a string and get the number of characters, in this case I am look for 3 to be returned. Later I want to use this number to pad a string with zeros Thanks! Dave #!/usr/bin/perl -w $num =123; ($match) = ($num =~ m/(\d)/); print "$match \n";