in reply to Converting bash script to perl

mlsrar, Here's an attempt to translate the first part.
#!/usr/bin/perl use strict; use warnings; my $input = $ARGV[0]; my ($service, $state) = $input =~ /Service:(.*)State:(.*)/s; my $company = substr $service, 0, 6; print <<EOF; Service: $service State: $state CompanY: $company EOF

You can look into using system for the last part.
You should still post your attempt to translate in perl.