Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 555
  • Last Modified:

perl, how to run shell command and route the shell's echo to STDOUT

I have a shell program that 'echo' out status.

I have a perl program that calls that shell program using back-tick
`./myshellprogram.sh"

How do I route shell output to STDOUT (or anything else would be fine).
0
rgbcof
Asked:
rgbcof
  • 2
1 Solution
 
ozoCommented:
system"./;myshellprogram.sh"
0
 
rgbcofAuthor Commented:
Ozo,

Excellent.  You had an extra semicolon in there that threw me off for a sec.  So what is the difference between "system" and back-tick?
0
 
ozoCommented:
Sorry about the typo
see
perldoc -f system
and "Quote-Like Operators" in
perldoc perlop
0

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now