Re: How can a sub return true or value?

2002-04-13 Thread Steven Brooks
On Sunday 14 April 2002 00:40, you wrote: > I use " " for true and "" for false. Is there a more standard (or > readable) values for true and false? > > Thanks in advance. You could use 0 as false and 1 (or another non-zero value) as true. Steven -- To unsubscribe, e-mail: [EMAIL PROTECTED]

Re: What are the uses of the =~ operator?

2002-01-16 Thread Steven Brooks
On Wednesday 16 January 2002 03:56 pm, rabs wrote: > I am new to regualr expressions and becoming accqainted with the =~ > operator. It appears to me that the =~ allows me to match a pattern in a > REGEX against a variable. As such it replaces the $_ varible. > > $name =~ /[rabs]/; > > mtaches w

Re: Security advice: SHA vs crypt for authenticator

2002-01-16 Thread Steven Brooks
On Wednesday 16 January 2002 11:45 am, [EMAIL PROTECTED] wrote: > Hello, > I'm using a nice little GDBM file for authentication. It just stores users > and passwords as SHA1 hashes. When I need to authenticate someone (fewer > than 15 lines in the dbm file) I just tie it and compare the SHA'd user

Re: 2 simple questions...

2002-01-14 Thread Steven Brooks
On Monday 14 January 2002 08:58 pm, Chris Anderson wrote: > I need to be able to do a wget (But not with a system() command if > possible) > I need to get the current directory. In Linux I type pwd and it shows it > to me, or > I can use the $PWD variable. But if I : > print "The current p

Re: All files in a directory tree

2002-01-14 Thread Steven Brooks
On Monday 14 January 2002 02:42 am, you wrote: > L.S., > I'm looking for a simple way to get all files in a directory and all it's > subdirectories on Win32. > For instance, the directory structure looks like this: > > c:\temp\ > file01.txt > file02.txt > c:\temp\subdir01 >

Re:How to know if a symlink exists

2002-01-14 Thread Steven Brooks
On Monday 14 January 2002 02:25 am, I wrote: > On Monday 14 January 2002 02:07 am, you wrote: > > Hi, I wanted to do this: > > ln -s X Y but unless it don't already exists? > > How can I do this in Perl? > > Thanks > > Using the normal file testing in Perl I think this'd work: > > if (-l $filename

Re:How to know if a symlink exists

2002-01-14 Thread Steven Brooks
On Monday 14 January 2002 02:07 am, you wrote: > Hi, I wanted to do this: > ln -s X Y but unless it don't already exists? > How can I do this in Perl? > Thanks Using the normal file testing in Perl I think this'd work: if (-l $filename) { # do stuff here } that's a dash then the letter

Re: Help with clearing an array

2002-01-14 Thread Steven Brooks
On Monday 14 January 2002 04:54 pm, you wrote: > Can I use this :- > @my_arry = undef; No, because it doesn't clear the array. Read the following quote: Small quote from "Learning Perl" page 53 - under the section "Using Scalar-Producing Expressions in a List Context" <> Going this direction is

Re: Adding quotes to a string variable

2002-01-07 Thread Steven Brooks
On Monday 07 January 2002 03:16 am, you wrote: > You have two options: > > Option one: Put the string between single quotes $a = '"Test Test Test"'; > > Option two: $a = q("Test Test Test"); > > Regards > Robert Graham Well, there are other options. Not that they are better, but they are option