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 "L" in lowercase. However this won't tell you if there's already a normal file with that name. You may also want to add a test using -e to make sure a file with that name doesn't exist. Steven -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]