Sunday, March 20, 2011

Perl won't run in terminal Ubuntu.

Script kiddies skip to the bottom for solution.


Ok so I was pisssssssssssssed.

I did a 7 way wipe on my disc and ever since perl wouldn't run from a Konsole? What the hell?

I checked my path and it was pointing at /usr/bin/. I added various directories to the bashrc file hidden in root and tried a few codes that I copied and pasted. Yes. I'm a fan of ctrl+v: so shoot me.

Anyway I found a solution. Although I'm still not sure why it works. I used to be able to navigate to the dir containing the file and then just run it like

myfile.pl

I can't do that now but the quick fix I found was to put ./ in front of the file.

so if your trying to run

myfile.pl

in a konsole simply navigate to the directory containing the file and enter this



./myfile.pl



full example:



problem:

jackie@jackie-desktop:~/Desktop$ file.pl
 

file.pl: command not found



 solution:


jackie@jackie-desktop:~/Desktop$ ./file.pl
 

Hello Assface!


p.s. Yes, my test script was programmed to print "Hello Assface." Getting it to work was the best feeling I've ever had while being insulted by a machine.

No comments:

Post a Comment