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: 
Say you have the following inputs:

```
$ for i in a b c ; do echo "$i is $i" > $i; done

$ cat a b c
a is a
b is b
c is c
```

Everybody knows capital letters are *much* better!

```
perl -i.bak -pe '$_ = uc' a b c
```

So now

```
$ cat a b c
A IS A
B IS B
C IS C
```

But we'd really like to can this in a command called `upcase`, and that's easy to do!

```
#! /usr/bin/perl -pi.bak
$_ = uc

```

See it at work:

```
$ for i in a b c ; do echo "$i is $i" > $i; done

$ cat a b c
a is a
b is b
c is c

$ ./upcase a b c

$ !cat
cat a b c
A IS A
B IS B
C IS C
```

More tips from an [answer to a similar question](https://stackoverflow.com/questions/2822525/how-can-i-convert-perl-one-liners-into-complete-scripts/2822762#2822762):

> 
> The `-e` option introduces Perl code to be executed—which you might think of as a script on the command line—so drop it and stick the code in the body. Leave `-p` in the shebang (`#!`) line.
> 
> 
> In general, it's safest to stick to at most one "clump" of options in the shebang line. If you need more, you could always throw their equivalents inside a `BEGIN {}` block.
> 
> 
> Don't forget to turn on the execute bit!
> 
> 
> 
> ```
> chmod +x script-name
> 
> ```
> 
>
You might be trying to do this:

```
system("/usr/bin/perl -e 'print \"Hello!\\\\n\";'");

```