Question: I have looked through a number of tutorials, but I still can't figure out what I am doing wrong... I am trying the code below (in a .pl Perl file, as an executable):

```
#!/usr/bin/perl

perl -e 'print "Hello";' 

```

I run this script and get: 

> 
> Execution of /home/user1/Desktop/file\_backups.pl aborted due to compilation errors.
> 
> 
> 

(I'm new to using Perl to call the Linux command line.)

Answer: 
`perl` is not a valid command inside a Perl script. If you had named that file as a .sh script, and used `#!/bin/bash` on the shebang line, it would have worked, but it doesn't really make a lot of sense to write a bash file just to invoke Perl (why not invoke Perl directly?)

Since you mentioned you want to interact with the command line, I'll mention here that you can get at the command line options within Perl via the `@ARGV` array. (See [perldoc perlvar](http://perldoc.perl.org/perlvar.html).)
Since you said you're looking for the opposite, this may be what you mean:

```
# vi stdin.pl
# cat stdin.pl
  #!/usr/bin/perl
  while(<STDIN>)
  {
      if( /^hello/ ){ print "Hello back to ya!\n"; }
  }
# chmod 0777 stdin.pl
# ./stdin.pl
  foo
  hello
  Hello back to ya!
#

```