Thread: Perl Question

  1. #1
    Registered User ssharish2005's Avatar
    Join Date
    Sep 2005
    Location
    Cambridge, UK
    Posts
    1,732

    Perl Question

    Hi all,

    This is probably is a simple question for perl experts. But i'm been scratching my on these weird notation and symbols in perl. quite annoying sometimes, but I appriciate their usefulness. But until i know what the heck they actually do, I think i would still be annoyed.

    Code:
    if( -e <path> ) { }
    I understand that the -e is similar to command line arugments, what are they called? Is there manual or topic which i could look into find any other options? Like -f and so on?

    ssharish
    Life is like riding a bicycle. To keep your balance you must keep moving - Einstein

  2. #2
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,659
    Quote Originally Posted by man perlfunc
    -X FILEHANDLE
    -X EXPR
    -X DIRHANDLE
    -X A file test, where X is one of the letters listed below. This unary operator takes one argument, either a filename, a filehandle, or a
    dirhandle, and tests the associated file to see if something is true about it. If the argument is omitted, tests $_, except for "-t", which
    tests STDIN. Unless otherwise documented, it returns 1 for true and '' for false, or the undefined value if the file doesn't exist. Despite
    the funny names, precedence is the same as any other named unary operator. The operator may be any of:

    -r File is readable by effective uid/gid.
    -w File is writable by effective uid/gid.
    -x File is executable by effective uid/gid.
    -o File is owned by effective uid.
    // and so on...
    man perl shows you a list of all the perl manual sub-pages
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  3. #3
    Registered User ssharish2005's Avatar
    Join Date
    Sep 2005
    Location
    Cambridge, UK
    Posts
    1,732
    Brilliant! Thanks Salem.

    ssharish
    Life is like riding a bicycle. To keep your balance you must keep moving - Einstein

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Perl question
    By Brian in forum Tech Board
    Replies: 2
    Last Post: 02-26-2005, 11:38 AM
  2. perl
    By ZakkWylde969 in forum Linux Programming
    Replies: 14
    Last Post: 01-03-2004, 01:42 PM
  3. perl program question
    By newbie2c in forum Tech Board
    Replies: 2
    Last Post: 02-03-2003, 10:19 AM
  4. c++& perl
    By spoude in forum C++ Programming
    Replies: 4
    Last Post: 09-11-2002, 12:55 PM
  5. Perl Question...
    By (TNT) in forum A Brief History of Cprogramming.com
    Replies: 1
    Last Post: 11-04-2001, 01:49 AM