input redirection

Discussion in 'Perl' started by MadHatter, Oct 14, 2003.

  1. MadHatter

    MadHatter Guest

    Hello,

    is there any command line switch or anything else which would allow me
    to use the standard input as the source for a script? so that I could
    type perl [option] hit return and type out the script and allow it to
    execute? I know about using file redirection "<", but I don't want to
    put the source on a file and redirect it's contents to the program,
    instead I want to directly type the contents of the script.
    MadHatter, Oct 14, 2003
    #1
    1. Advertising

  2. MadHatter

    Guest

    (MadHatter) wrote in message news:<>...

    > is there any command line switch or anything else which would allow me
    > to use the standard input as the source for a script?


    -

    This newsgroup does not exist (see FAQ). Please do not start threads here.
    , Oct 15, 2003
    #2
    1. Advertising

  3. MadHatter

    Roy Johnson Guest

    (MadHatter) wrote in message news:<>...
    > is there any command line switch or anything else which would allow me
    > to use the standard input as the source for a script?


    perldoc perlrun

    will tell you to give perl the option "-" to read the program from
    stdin. Use comp.lang.perl.misc instead of this newsgroup.
    Roy Johnson, Oct 15, 2003
    #3
  4. MadHatter

    MadHatter Guest

    wrote in message news:<>...
    > (MadHatter) wrote in message news:<>...
    >
    > > is there any command line switch or anything else which would allow me
    > > to use the standard input as the source for a script?

    >
    > -
    >
    > This newsgroup does not exist (see FAQ). Please do not start threads here.


    if it does not exist how can I post to it?
    I'm asking a perl question... that has to do with the execution of a
    perl script, using the perl binary... how much more perl oriented can
    it get? sheesh!
    MadHatter, Oct 15, 2003
    #4
  5. MadHatter

    Guest

    (MadHatter) wrote in message news:<>...
    > wrote in message news:<>...
    > > (MadHatter) wrote in message news:<>...
    > >
    > > > is there any command line switch or anything else which would allow me
    > > > to use the standard input as the source for a script?

    > >
    > > -
    > >
    > > This newsgroup does not exist (see FAQ). Please do not start threads here.

    >
    > if it does not exist how can I post to it?


    Some misconfigured newsservers still think it exists.

    Google still archives it.

    I have written to Google.com support to point out that their service
    should warn people before allowing them to post to non-existant
    newsgroups.

    Perhaps you should write too.

    If they get enough people complaining that Google has allowed them to
    post to non-existant newsgroups without warning perhaps they'll do
    something.

    > I'm asking a perl question... that has to do with the execution of a
    > perl script, using the perl binary... how much more perl oriented can
    > it get? sheesh!


    You appear to be halucinating that someone said your question was
    off-topic. If this newsgroup had existed your question would have
    been on-topic. Although maybe it would have deserved an RTFM response
    "perlrun - how to execute the Perl interpreter".

    I didn't bother to tell you to RTFM and just gave you the answer.
    After all the answer to your question could not have been any shorter,
    it was only one character long!
    , Oct 16, 2003
    #5
  6. MadHatter

    Roy Johnson Guest

    (MadHatter) wrote in message news:<>...
    > wrote in message news:<>...
    > > This newsgroup does not exist (see FAQ). Please do not start threads here.

    >
    > if it does not exist how can I post to it?


    You seem to have overlooked his parenthetical comment.

    > I'm asking a perl question...


    He didn't say you weren't. More people will read your question if you
    post in comp.lang.perl.misc, which is the valid newsgroup for perl
    questions.

    http://dbforums.com/arch/96/2003/1/649376
    Yes, on some sites it exists, but it is not a "standard" group
    anymore, so
    it does not exist on many news servers.

    Messages sent to comp.lang.perl are not seen by nearly as many people
    as
    the suggested groups, and if other people who do not see that group
    try to
    respond (i.e. if they see it because it's cross posted to a visible
    group)
    then their response may not arrive at all on any groups because the
    error
    (from their server's point of view) will prevent the message being
    posted.

    comp.lang.perl is effectively a private group, just like the ones you
    may
    have set up at work, or like the local groups set up on a freenet like
    this one.
    Roy Johnson, Oct 16, 2003
    #6
  7. MadHatter

    MadHatter Guest

    (Roy Johnson) wrote in message news:<>...
    > (MadHatter) wrote in message news:<>...
    > > is there any command line switch or anything else which would allow me
    > > to use the standard input as the source for a script?

    >
    > perldoc perlrun
    >
    > will tell you to give perl the option "-" to read the program from
    > stdin. Use comp.lang.perl.misc instead of this newsgroup.


    lol, I just noticed the - in the first reply, and what I thought was a
    reply was his sig. sorry about the tizzy.

    thanks for the info. I'll post in the misc next time. thanks all.
    MadHatter, Oct 16, 2003
    #7
    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. S
    Replies:
    1
    Views:
    813
  2. Matt
    Replies:
    0
    Views:
    306
  3. Dan Upton

    fork/exec with input redirection

    Dan Upton, Nov 26, 2007, in forum: Python
    Replies:
    3
    Views:
    403
    Dan Upton
    Nov 27, 2007
  4. candide

    Input redirection with IDLE

    candide, Oct 13, 2009, in forum: Python
    Replies:
    0
    Views:
    260
    candide
    Oct 13, 2009
  5. Michal Suchanek

    Input redirection in ruby

    Michal Suchanek, Jul 31, 2008, in forum: Ruby
    Replies:
    4
    Views:
    126
    Robert Klemme
    Aug 1, 2008
Loading...

Share This Page