#!/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;