in reply to Giving the input file to XMLin() from the command line as an argument

XMLin('$ARGV[0]/system.xml')

That should work just fine if you use double quotes instead of single quotes.  (Single quotes don't interpolate...)

As for passing a file handle, you can say

my $parser = XML::Simple->new(); my $data = $parser->XMLin($fh); # or my $data = $parser->XMLin(\*FH);

where $fh is a lexical file handle (i.e. open my $fh, ...), or an IO::File file handle, and \*FH is a ref to an old-style glob file handle.

Replies are listed 'Best First'.
Re^2: Giving the input file to XMLin() from the command line as an argument
by uday_sagar (Scribe) on Jan 25, 2012 at 06:09 UTC
    Thanks a lot Eliya! Its working and cool!!