in reply to unix to perl questions

It looks like you've got the general idea fairly well, but you're right that there are quite a few syntax issues to work out. First, it looks like you've written this in a program like Microsoft Word, resulting in incorrect capitalization, quoting characters, and such. I suggest you work with a plain text editor, or even better, a programmer's editor with syntax highlighting (depending on your preferred OS and windowing system we can make some suggestions).

To learn the syntax, it's probably best to take a step back and first get a very short Perl script working, and then extend it with the features that you need. I recommend you start with perlintro, a short but very good introduction that will show you many of the things that you need for your script.

Replies are listed 'Best First'.
Re^2: unix to perl questions
by deyaneria (Acolyte) on Mar 12, 2015 at 00:25 UTC
    I work it out in word but then have to retype it into vi. So none of the capitalizaion will be there unless it's a variable. I have written 2 other scripts so that are working so I am getting it. What is this programmers editor you speak of? I am running window 8, using oracle vm shell with Ubuntu, my Perl verison is v5.18.2.

      Komodo Edit or Sublime are good programmer's editors on Windows. However if you are doing this in the context of Unix you'd be better to set up a virtual machine (Virtual Box or VM Player for example) on your Windows box and run Unix in the VM. That way you can work with a real unix system and tools. There's a bit of work getting everything going that way, but you'll learn a lot!

      Perl is the programming world's equivalent of English
        I actually do run oracle VM with Ubuntu and use vi for the my editor. I just like to work it out in word first...I write out the pseudocode and then what the real code would be. As this is only my second week writing in perl there are many mistakes and I have to do a ton of research(it's not always conducive to have vm running with bunch of tabs open on my laptop).I remember the days of COBOL I pouring over lines of printed code and real drawn out flowcharts on huge graph paper.