Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask

Re: detects only input after perl script is run.

by blue_cowdawg (Monsignor)
on May 03, 2013 at 15:41 UTC ( #1031915=note: print w/replies, xml ) Need Help??

in reply to <STDIN> detects only input after perl script is run.

If you wanted to send an "h" to standard input you should invoke your script

echo "h" | perl
also another thought:
#!/usr/bin/perl -w use strict; #damn fine idea my $user_value=<STDIN>; chomp $user_vaule;

Peter L. Berghold -- Unix Professional
Peter -at- Berghold -dot- Net; AOL IM redcowdawg Yahoo IM: blue_cowdawg

Replies are listed 'Best First'.
Re^2: <STDIN> detects only input after perl script is run.
by tty1x (Novice) on May 03, 2013 at 16:49 UTC
    Noted on  use strict :)

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1031915]
[chacham]: the same thing could be achieved with a trigger
[LanX]: choroba yes
chacham shudders at the thought of using a evil
LanX will need to find a Perl workaround ... :-|
LanX leaving his cave to enjoy sun! *\o/*

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (6)
As of 2017-03-30 15:14 GMT
Find Nodes?
    Voting Booth?
    Should Pluto Get Its Planethood Back?

    Results (360 votes). Check out past polls.