The backticks operator: `STRING` executes STRING, waits until it exits and returns the output of STRING as a single string. See man perlop for more information. yt, snowcrash#!/usr/bin/perl -w use strict; ### execute script and save content in $output my $output = `./2.pl argument.txt`; my $filename = "./output.txt"; ### write output to file $filename open (OUTFILE, ">$filename") or die "Can't open $filename: $!"; print OUTFILE $output; close OUTFILE;
In reply to Re: Newbie Question
by snowcrash
in thread Newbie Question
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |