$[ (was: Re: Converting to capital only one word in a line)

2007-01-16 Thread Dr.Ruud
"Jay Savage" schreef: >> There are, however, >> modules that modify all sorts of internal variables and symbol tables >> to enhance efficiency and work magic, and there is always a slight >> chance that someone, somewhere has messed with $[ and not told you >> about it. If they have, you'll end wi

Re: Converting to capital only one word in a line

2007-01-15 Thread Jay Savage
On 1/15/07, Jay Savage <[EMAIL PROTECTED]> wrote: On 1/15/07, Leonid Grinberg <[EMAIL PROTECTED]> wrote: > > The backslash escapes the character following it. > > Oh, that's right. Sorry. > > > Using scalar() there is redundant as the expression is already in scalar > > context. Also using "scal

Re: Converting to capital only one word in a line

2007-01-15 Thread Leonid Grinberg
The backslash escapes the character following it. Oh, that's right. Sorry. Using scalar() there is redundant as the expression is already in scalar context. Also using "scalar(@split_home) - 1" will not work correctly if the value of $[ has been changed. What exactly *is* $[? It has been co

Re: Converting to capital only one word in a line

2007-01-14 Thread John W. Krahn
Leonid Grinberg wrote: >> You don't have to escape the colon in a regular expression. > > Oh, cool. Didn't know that. > >> > my $home = $split_line[5]; >> > my @split_home = split(/\/, $home); >> ^^^ >> Syntax error. The terminating delimiter is missing. > > I am confus

Re: Converting to capital only one word in a line

2007-01-14 Thread Leonid Grinberg
You don't have to escape the colon in a regular expression. Oh, cool. Didn't know that. > my $home = $split_line[5]; > my @split_home = split(/\/, $home); ^^^ Syntax error. The terminating delimiter is missing. I am confused. What do you mean, the terminating delimt

Re: Converting to capital only one word in a line

2007-01-14 Thread John W. Krahn
Leonid Grinberg wrote: > my @split_line = split(/\:/, $line); You don't have to escape the colon in a regular expression. > my $home = $split_line[5]; > my @split_home = split(/\/, $home); ^^^ Syntax error. The terminating delimiter is missing. > return uc($split_home[s

Re: Converting to capital only one word in a line

2007-01-14 Thread Leonid Grinberg
my @split_line = split(/\:/, $line); my $home = $split_line[5]; my @split_home = split(/\/, $home); return uc($split_home[scalar(@split_home) - 1]); On 1/11/07, Emilio Casbas <[EMAIL PROTECTED]> wrote: I know that this is not a exact perl question, but maybe someone has a perl solution. You hav

Re: Converting to capital only one word in a line

2007-01-11 Thread John W. Krahn
Emilio Casbas wrote: > I know that this is not a exact perl question, but maybe someone has a > perl solution. > > You have the passwd file such this: > > > test:x:593:501::/usr/local/etc5/test:/bin/bash > >

Converting to capital only one word in a line

2007-01-11 Thread Emilio Casbas
I know that this is not a exact perl question, but maybe someone has a perl solution. You have the passwd file such this: test:x:593:501::/usr/local/etc5/test:/bin/bash and you have to convert it to: ---

One word

2004-08-13 Thread Fontenot, Paul
I have a DBI script to extract information via ODBC from a MSSQL server. I can get everything I need BUT on one returned value $mso in the following script I want to match one word. It is always MS0?-??? .How can I go about doing this? SAMPLE MS0?-??? ENTRY