in reply to File::Remote wierdness. (problems using strict?)

Not sure if I get everything right, but here's the story. Usually, under use strict you are not allowed to use barewords like ARPFILE. A bareword is something perl "can't make sense of," thus it treats it as a quoted string 'ARPFILE' if there isn't any stricture. That's why you get the error.

Unusually, there are some internal functions, like your open example, where barewords are okay, even under use strict, because they are meant as handles. opendir, sysopen and a few others seem to fall into this category. That's why your last example open FIN,"</etc/passwd" or die $!; works fine, even if FIN is a bareword.

Your call to File::Remote::open $rp->open (ARPFILE,...) on the other hand is nothing but a plain method call, hence the error.

It wouldn't be Perl if there weren't a few ways to solve this. Here's how I would do it. I prefer lexicals, so I'd create an anonymous glob with gensym using Symbol. Then one can usually use $arpfile like any other handle. Note that the following is untested.

#!/usr/bin/perl use strict; use warnings; use File::Remote; use Symbol; my $rp = new File::Remote( rsh=>"/usr/bin/ssh", rcp=>'/usr/bin/scp'); my $arpfile = gensym; $rp->open ($arpfile,"xeng-mon01:/usr/local/router-walk/data/arp.csv") or die $!; my $line=<$arpfile>; print $line;

Let me know if this is working for you.