I'm taking a survey course of languages and we are covering perl this week. I have never used terminal before. I need to write perl script that will parse xml data, but I can't even figure out how to use the terminal.
when I open the terminal I get this line(I subed out my name and username):
firstName-LastName-MacBook-Pro:~ username$
i have tried the commands ls and that works, but I can't figure out how to run scripts from a file. I have tried a simple hello world app by typing:
#!/usr/local/bin/perl
print "Hello World!\n";
in text edit saving it as hello.pl then I tried to type hello.pl in the terminal and it says
-bash: first.pl: command not found
can someone explain in simple terms how to run simple programs like this?
thanks, aaron
when I open the terminal I get this line(I subed out my name and username):
firstName-LastName-MacBook-Pro:~ username$
i have tried the commands ls and that works, but I can't figure out how to run scripts from a file. I have tried a simple hello world app by typing:
#!/usr/local/bin/perl
print "Hello World!\n";
in text edit saving it as hello.pl then I tried to type hello.pl in the terminal and it says
-bash: first.pl: command not found
can someone explain in simple terms how to run simple programs like this?
thanks, aaron