newbie perl questions

Discussion in 'Perl Misc' started by chrispatton@gmail.com, Jan 22, 2005.

  1. Guest

    Hello, everyone.

    Is there a way to use the Perl interpereter interactivwely? As in, I
    type a command
    and the interpereter gives me the same responce it would give me in a
    regular running program.

    Is anyone familiar with the Python statement "exec"? Is there and
    equivelant to this in Perl? I tried this statement in Perl, and the OS
    executed the string passed to it. (awsome!)

    Thanks!
     
    , Jan 22, 2005
    #1
    1. Advertising

  2. Alex Hart Guest

    perl -e 'print "hello world"
     
    Alex Hart, Jan 22, 2005
    #2
    1. Advertising

  3. wrote:

    > Subject: newbie perl questions


    Please put the subjuect of your post in the Subject of your post. Your
    post is not about newbie perl questions, the subject of your post is:

    > Is there a way to use the Perl interpereter interactivwely?


    This is, of course, FAQ: "How can I use Perl interactively?"

    Note: the answer given in the latest version of the FAQ is much more
    complete than in older versions so I suggest reading the FAQ on a
    website such as CPAN rather than your local copy.

    > Is anyone familiar with the Python statement "exec"?


    No I'm not but at a guess you are looking for another function starting
    with the same letter.

    A full list of Perl builtin functions can be found in the perlfunc
    manual. If you are learning Perl it's really worth speding 5-10
    minuites skimming this document.
     
    Brian McCauley, Jan 22, 2005
    #3
  4. Shawn Corey Guest

    wrote:
    > Hello, everyone.
    >
    > Is there a way to use the Perl interpereter interactivwely? As in, I
    > type a command
    > and the interpereter gives me the same responce it would give me in a
    > regular running program.
    >
    > Is anyone familiar with the Python statement "exec"? Is there and
    > equivelant to this in Perl? I tried this statement in Perl, and the OS
    > executed the string passed to it. (awsome!)
    >
    > Thanks!
    >


    UNIX: perl -ple '$_=eval'
    DOS: perl-ple "$_=eval"

    Type 'exit' to quit.

    --- Shawn
     
    Shawn Corey, Jan 22, 2005
    #4
  5. Scott Bryce Guest

    wrote:

    > Is anyone familiar with the Python statement "exec"? Is there and
    > equivelant to this in Perl? I tried this statement in Perl, and the OS
    > executed the string passed to it. (awsome!)


    If you tried it, and it worked, it must exist. I don't know whether it
    does the same thing that exec does in Python. You can find out here:

    http://www.perldoc.com/perl5.8.4/pod/func/exec.html
     
    Scott Bryce, Jan 22, 2005
    #5
  6. Anno Siegel Guest

    Brian McCauley <> wrote in comp.lang.perl.misc:
    >
    > A full list of Perl builtin functions can be found in the perlfunc
    > manual. If you are learning Perl it's really worth speding 5-10
    > minuites skimming this document.


    The section "Perl Functions by Category" in that document is particularly
    noteworthy, not to memorize it, but to remember it's there. Not only
    beginners often face the question "I'm sure Perl can do this, but how
    could it be called?". The answer can usually be found right there.

    Anno
     
    Anno Siegel, Jan 23, 2005
    #6
    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. Luther Barnum
    Replies:
    26
    Views:
    601
    Harry George
    Oct 27, 2003
  2. Ali Syed
    Replies:
    3
    Views:
    562
    Mark McIntyre
    Oct 13, 2004
  3. JohnE

    newbie with newbie questions

    JohnE, Aug 17, 2009, in forum: ASP .Net
    Replies:
    3
    Views:
    513
    Gregory A. Beamer
    Aug 17, 2009
  4. News.Individual.NET

    More newbie questions about Perl

    News.Individual.NET, Sep 1, 2003, in forum: Perl Misc
    Replies:
    1
    Views:
    103
    James Willmore
    Sep 1, 2003
  5. J Krugman
    Replies:
    7
    Views:
    156
    Ben Morrow
    Jun 14, 2004
Loading...

Share This Page