in reply to Re: Parsing output from a 'system' call into objects?
in thread Parsing output from a 'system' call into objects?
For your information, most (if not all) of your print statements can be interpolated. So this:
print 'From hash'."\n"; for my $o (@order) { my $h=$array->{$o}; print ' ID = '.$h->{ID}."\n"; print ' CoID = '.$h->{CoID}."\n"; print ' State = '.$h->{State}."\n";
Becomes this:
print "From hash\n"; for my $o (@order) { my $h=$array->{$o}; print " ID = $h->{ID}\n"; print " CoID = $h->{CoID}\n"; print " State = $h->{State}\n";
Or:
print "From hash\n"; for my $o (@order) { print "" . " ID = $array->{$o}->{ID}\n" . " CoID = $array->{$o}{CoID}\n" . " State = $array->{$o}->{State}\n";
Or with a heredoc, but I digress.
Also, I'm curious as to why you're calling a hash $array... ;)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Parsing output from a 'system' call into objects?
by huck (Prior) on Feb 21, 2017 at 20:31 UTC |