If it needs to run under bash then run it under bash:
#!/usr/bin/perl # https://perlmonks.org/?node_id=1224244 use strict; use warnings; use Data::Dumper; my $command = 'date'; # simplified command for test purposes my $data = `bash -c $command` or die"$!\n"; print Dumper $data;
In reply to Re: Runs from Command Line but NOT from Perl
by tybalt89
in thread Runs from Command Line but NOT from Perl
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |