Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: Converting bash script to perl

by mikasue (Friar)
on Jun 28, 2006 at 16:51 UTC ( [id://558067]=note: print w/replies, xml ) Need Help??


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.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://558067]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (5)
As of 2024-04-19 02:07 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found