in reply to Passing a hash into a subroutine
You should provide the code where you are trying to collect the values of the hash. It is very hard to find one's error until the code is remaining hidden.
Here is a tip until you do that:
I prefer passing hashrefs though...#!/usr/bin/perl use strict; use Data::Dumper; convert ( 'MIME-Type' => 'application/ms-word', 'Input' => '[In file]', 'Output' => '[Out file]' ); sub convert { my %hash = @_; # show the full thing print Dumper(\%hash); # or just one value print $hash{'Output'},"\n"; }
--
tune
In Section
Seekers of Perl Wisdom