I'm learning perl now. By using whereis command, I found out where perl command is.
I make a program and tried to execute it. But I got error message like this one.
$perl yahoo_search.pl #!/usr/bin/perl
-bash: !/usr/bin/perl: event not found
Can somebody tell me what I should do to solve this problem?
The ! character is the default history modifier used by the bash shell (and nothing to do with perl). ! followed by all sorts of things, does all sorts of things.
!$ refers to the last parameter of the previous command, so this would be in effect the same as typing cat file.pl If you really want a ! on the command line, you need to escape it with \ $perl yahoo_search.pl #\!/usr/bin/perl Also, # is regarded as a comment by bash.
The #!/usr/bin/perl is usually the first line of whatever prog.pl file you're creating. More specifically, I go with #!/bin/perl -w