There's more than one way to do things | |
PerlMonks |
Re: Unable to use Device::SerialPort on Mac OS Xby broomduster (Priest) |
on Aug 16, 2009 at 19:47 UTC ( [id://789042]=note: print w/replies, xml ) | Need Help?? |
I am using Device::SerialPort with no problems on 10.4.11 (Tiger). I know of folks using it successfully on 10.5.x.
I think AnonyMonk is pointing you in the right direction w.r.t. multiple Perl installations. You start with #!/usr/bin/perl, which is the Apple-supplied Perl. But all that /opt/local/... points at MacPorts, which suggests that you also have a Perl installation from there (probably /opt/local/bin/perl; try saying which perl on the command line). My guess is that even though you think you installed Device::SerialPort by hand, you either did so using the MacPorts Perl, or you really installed it via MacPorts (looks to me that they have a port for that). Check to be sure that you really do have a MacPorts-installed Perl and change your shebang line accordingly. As AnonyMonk suggests, also try reinstalling Device::SerialPort if the altered shebang does not work. Disclaimer: I don't use MacPorts, so these are Intelligent Guesses, not Definitive Truth. Updated: I see you also posted back while I was replying and that you are back on track. If you change the first line of your script to #!/opt/local/bin/perlyou will get the right Perl installation and not have to do /opt/local/bin/perl < filename on the command line.
In Section
Seekers of Perl Wisdom
|
|