Re: first glimpse of regex

2002-03-19 Thread Curtis Poe
--- Patrick Diffley <[EMAIL PROTECTED]> wrote: > One way of doing this: > chop ($username); > if ($username eq "") { >... > } > This will at least ensure that a carriage return > is not included in the scalar 'chop' has been so heavily misused that, if I recall correc

Re: first glimpse of regex

2002-03-19 Thread Patrick Diffley
One way of doing this: chop ($username); if ($username eq "") { ... } This will at least ensure that a carriage return is not included in the scalar PJD - Original Message - From: "Matthew Harrison" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday,

Re: first glimpse of regex

2002-03-19 Thread Curtis Poe
--- Matthew Harrison <[EMAIL PROTECTED]> wrote: > i need to say something like > if $username = "" then ... > > where "" is literally nothing. i want to match it ONLY if the variable is > totally empty. > > this is my first experience with regex so what should this be? > > -- > Matthew Harris

Re: first glimpse of regex

2002-03-19 Thread Brett W. McCoy
On Tue, 19 Mar 2002, Matthew Harrison wrote: > i need to say something like > if $username = "" then ... > > where "" is literally nothing. i want to match it ONLY if the variable is > totally empty. > > this is my first experience with regex so what should this be? if(!$username) { } An e