in reply to passing variable arguments to XSL from perl

Just iterate over the keys of %in to build your new arguments hash:

... my %in = ( arg1 => 'foo', arg2 => 'bar', arg3 => 'baz', ignore => 'this entry', idx => 'index', newperiod => "bar", ); my %xsltargs; map { $xsltargs{$_} = $in{$_} } grep /^arg|^idx$|^newperiod$/, keys %in; ... my $results = $stylesheet->transform( $source, XML::LibXSLT::xpath_to_string(%xsltargs) );

-derby