no prompt option in perl
Hi all,
how do i use a no prompt option in perl
print "Press Enter to Continue";
my $x =;
the above prompts to enter , to continue..
how do avoid it..
when no prompt is given script should not ask for "pressing enter'
thanks in advance
FireFleur posted this at 19:09 — 21st October 2008.
They have: 11 posts
Joined: Oct 2008
print sends a string to stdout. So, if you print something it will display generally (stout being directed to the output).
You can redirect stdout for example:
perl yourfile.pl 2>/dev/null
but that will remove all stdout and redirect it to /dev/null
or you could just comment the print command.
# print "Press ...
Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.