simple header for perl programs
Hi, i am trying to do something very simple like a header and a footer for my first perl programs, what iam trying to do is that when i create a file in vim: lets say hello.pl , i would like that file to have already this in its header:
#!/usr/bin/perl
and this on the footer:
print "\n";
so that i dont have to type everytime #!/usr ..... etc
i tried to do it this way but i get weird vim errors:
header is a file that contains the header and footer
$ vim hello.pl;header > hello.pl
is there another way to do it as a function in bash or some other one liner command?
apologies if what i am trying to do sounds ridiculous ,i just want to be able to create perl files in vim but with the header and footer.
thanks.
|