system call - how to

Discussion in 'Perl Misc' started by elsiddik, May 1, 2007.

  1. elsiddik

    elsiddik Guest

    well i wanted to just mess a little with perl and try if it can give
    me the same result of a small shell script i wrote a little while ago
    but it doesnt seems to work out with me . here is my shell script

    #!/bin/bash DIRECTORY="/usr/bin"
    for file in $DIRECTORY/*
    do whatis `basename $file`
    done
    exit 0


    i tried to run a similiar perl code by typing on command line.

    perl -e "system qw (whatis /usr/bin/*)"


    but its not giving me the same whatislog - what am i doing wrong ?
    cheers.
     
    elsiddik, May 1, 2007
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. bill sandner
    Replies:
    1
    Views:
    879
    iksrazal
    Jul 1, 2004
  2. system call and library call

    , Aug 22, 2005, in forum: C Programming
    Replies:
    7
    Views:
    3,017
    Jonathan Bartlett
    Aug 23, 2005
  3. leoman730

    System call and library call

    leoman730, May 3, 2007, in forum: C++
    Replies:
    6
    Views:
    916
    Jim Langston
    May 6, 2007
  4. David Pratt
    Replies:
    0
    Views:
    264
    David Pratt
    Apr 7, 2008
  5. David Pratt
    Replies:
    0
    Views:
    406
    David Pratt
    Apr 7, 2008
Loading...

Share This Page