So I have been dealing a lot lately with using putty on PC to ssh into all the mac computers in my environment and taking a look at some installed versions of software, trivial file deletion, and some uninstalling of some utilities.
Fast forward to today and I decide that I am going to write some simple perl scripts to handle these tasks and release them out for the community that works with the same systems management tool that we use. I fire up terminal on my MBP and type in 'perl -v' which tells me it is 5.10.
I decide to go ahead and test out perl to make sure it's functional so I write a simple test script of:
#!/usr/bin/perl
print "Hello\n";
I then CD to the directory where that script was housed and do 'perl test.pl' and holy torrent of errors. I've pasted them below as an example.
(Missing semicolon on previous line?)
Backslash found where operator expected at myfirstscript.pl line 7, near "f0\"
Backslash found where operator expected at myfirstscript.pl line 7, near "fs24 \"
(Do you need to predeclare fs24?)
syntax error at myfirstscript.pl line 1, near "rtf1\"
syntax error at myfirstscript.pl line 3, near "red255\"
syntax error at myfirstscript.pl line 4, near "margl1440\"
Execution of myfirstscript.pl aborted due to compilation errors.
Keep in mind some of these errors refer to a line 7 when I don't even have a line 7. I found some info online that talks about a 2009-01 software update package that killed perl with certain CPAN modules. I was going to follow the steps outlined (involves reinstalling IO) but make is not installed on this macbook?!??!
Any ideas?
Fast forward to today and I decide that I am going to write some simple perl scripts to handle these tasks and release them out for the community that works with the same systems management tool that we use. I fire up terminal on my MBP and type in 'perl -v' which tells me it is 5.10.
I decide to go ahead and test out perl to make sure it's functional so I write a simple test script of:
#!/usr/bin/perl
print "Hello\n";
I then CD to the directory where that script was housed and do 'perl test.pl' and holy torrent of errors. I've pasted them below as an example.
(Missing semicolon on previous line?)
Backslash found where operator expected at myfirstscript.pl line 7, near "f0\"
Backslash found where operator expected at myfirstscript.pl line 7, near "fs24 \"
(Do you need to predeclare fs24?)
syntax error at myfirstscript.pl line 1, near "rtf1\"
syntax error at myfirstscript.pl line 3, near "red255\"
syntax error at myfirstscript.pl line 4, near "margl1440\"
Execution of myfirstscript.pl aborted due to compilation errors.
Keep in mind some of these errors refer to a line 7 when I don't even have a line 7. I found some info online that talks about a 2009-01 software update package that killed perl with certain CPAN modules. I was going to follow the steps outlined (involves reinstalling IO) but make is not installed on this macbook?!??!
Any ideas?