In linux, How do you call a perl script from a perl script and print the output to the screen and to a log file?
Answer:
#!/usr/bin/perl -w `clear`; print "\n\n\n\n What is the Passing Variable? "; my $ans = <STDIN>; chomp $ans; system("perl some_perl_script.pl -s $ans -r | tee -a ./log/$ans.log 2> +&1");
I couldn't find this answer when I was looking. I figured it out and thought this might help someone else
In reply to Perl script Print to Screen and log by daddygoofball
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |