open LPR, ">LPT1:" or die "Couldn't open printer"; print LWP <>; #### my $file = 'foo.xls'; system("print $file");