HI help with perl

Discussion in 'Perl Misc' started by prash, Sep 22, 2005.

  1. prash

    prash Guest

    Hello everybody,

    I am new to perl and have been learning it. I urgently need some
    example scripts of implementing linux/unix commands like ls, useradd,
    mkdir etc using perl.
    Please send me the scripts ASAP
    thanks in advance for the help.
    regards,
    pras
     
    prash, Sep 22, 2005
    #1
    1. Advertising

  2. prash

    Anno Siegel Guest

    prash <> wrote in comp.lang.perl.misc:
    > Hello everybody,
    >
    > I am new to perl and have been learning it. I urgently need some
    > example scripts of implementing linux/unix commands like ls, useradd,
    > mkdir etc using perl.


    Implementing or calling? There's a difference.

    > Please send me the scripts ASAP


    This is not a distribution service of ready-made scripts.

    For how to call system commands from Perl, look up exec and system
    in perlfunc, and find "backticks" in perlop. If you have problems
    using them, post your attempts and we can see about correcting them.

    Anno
    --
    If you want to post a followup via groups.google.com, don't use
    the broken "Reply" link at the bottom of the article. Click on
    "show options" at the top of the article, then click on the
    "Reply" at the bottom of the article headers.
     
    Anno Siegel, Sep 22, 2005
    #2
    1. Advertising

  3. Sherm Pendley, Sep 22, 2005
    #3
  4. prash

    prash Guest

    Hi,

    What i mean is I want to know how to write a perl script that produces
    results similar to unix commands like ls, useradd, etc..
    I would like to implement unix commands using perl. Is this possible.
    Please help.

    thx
    pras
    prash wrote:
    > Hello everybody,
    >
    > I am new to perl and have been learning it. I urgently need some
    > example scripts of implementing linux/unix commands like ls, useradd,
    > mkdir etc using perl.
    > Please send me the scripts ASAP
    > thanks in advance for the help.
    > regards,
    > pras
     
    prash, Sep 23, 2005
    #4
  5. prash

    Babacio Guest

    "prash" <> writes:

    > Hi,
    >
    > What i mean is I want to know how to write a perl script that produces
    > results similar to unix commands like ls, useradd, etc..
    > I would like to implement unix commands using perl. Is this possible.
    > Please help.


    You shouldn't top post. You should try to do something, and if does
    not work, ask for help to debug it.

    As a start, this is a poor man's ls in perl. (Very poor man, indeed)

    perl -e 'while(glob("*")){print "$_\n";}'

    --
    Bé erre hue ixe eu elle, Bruxelles.
     
    Babacio, Sep 23, 2005
    #5
  6. prash wrote:
    > Hi,
    >
    > What i mean is I want to know how to write a perl script that produces
    > results similar to unix commands like ls, useradd, etc..
    > I would like to implement unix commands using perl. Is this possible.


    Yes, it is possible.

    > Please help.


    Help? How can we help if you don't do anything?

    Post some code and describe what you think it does and what it actually
    does.
    _Then_ we'll help refining your code.

    --
    Josef Möllers (Pinguinpfleger bei FSC)
    If failure had no penalty success would not be a prize
    -- T. Pratchett
     
    Josef Moellers, Sep 23, 2005
    #6
  7. prash wrote:
    >
    > What i mean is I want to know how to write a perl script that produces
    > results similar to unix commands like ls, useradd, etc..
    > I would like to implement unix commands using perl. Is this possible.


    http://ppt.perl.org/


    John
    --
    use Perl;
    program
    fulfillment
     
    John W. Krahn, Sep 23, 2005
    #7
  8. "prash" <> wrote in news:1127479557.983767.46950
    @g49g2000cwa.googlegroups.com:

    [ Please do not top-post ]

    > What i mean is I want to know how to write a perl script that produces
    > results similar to unix commands like ls, useradd, etc..
    > I would like to implement unix commands using perl. Is this possible.
    > Please help.


    Have you even tried searching Google or CPAN:

    http://ppt.perl.org/

    http://search.cpan.org/~mschwern/ExtUtils-MakeMaker-
    6.30/lib/ExtUtils/Command.pm

    Now, please go ahead, and read the posting guidelines for this group.

    Sinan
    --
    A. Sinan Unur <>
    (reverse each component and remove .invalid for email address)

    comp.lang.perl.misc guidelines on the WWW:
    http://mail.augustmail.com/~tadmc/clpmisc/clpmisc_guidelines.html
     
    A. Sinan Unur, Sep 23, 2005
    #8
    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. dpackwood
    Replies:
    3
    Views:
    1,865
  2. PerlFAQ Server

    FAQ 1.4 What are Perl 4, Perl 5, or Perl 6?

    PerlFAQ Server, Jan 23, 2011, in forum: Perl Misc
    Replies:
    0
    Views:
    334
    PerlFAQ Server
    Jan 23, 2011
  3. PerlFAQ Server
    Replies:
    0
    Views:
    729
    PerlFAQ Server
    Feb 3, 2011
  4. PerlFAQ Server

    FAQ 1.4 What are Perl 4, Perl 5, or Perl 6?

    PerlFAQ Server, Feb 27, 2011, in forum: Perl Misc
    Replies:
    0
    Views:
    324
    PerlFAQ Server
    Feb 27, 2011
  5. PerlFAQ Server
    Replies:
    0
    Views:
    736
    PerlFAQ Server
    Apr 4, 2011
Loading...

Share This Page