Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re: Compare Inventory to Database and Vice-Versa

by GrandFather (Cardinal)
on Mar 22, 2012 at 00:06 UTC ( #960895=note: print w/ replies, xml ) Need Help??


in reply to Compare Inventory to Database and Vice-Versa

So what have you tried and what didn't work? What Perl documentation have you read? Have you looked through the Tutorials section? Have you any other programming experience?

When reading through documentation take special note of anything that mentions the word "hash". Perl's hash data structure is the key to much of what you want to do. Another key Perl feature is likely to be regular expressions - see perlretut.

True laziness is hard work


Comment on Re: Compare Inventory to Database and Vice-Versa
Re^2: Compare Inventory to Database and Vice-Versa
by Hellhound4 (Novice) on Mar 22, 2012 at 00:22 UTC
    I have experience in C++ and (recently) VBA I've actually written the program in VBA but it only throws an error if there is something in the database and not the directory. But I would like to know if there is something hanging out in my directories that shouldn't be there as well. And I am reading the tutorials right now. Most of my questions are about syntax and perl specific issues. For example if I make this on my linux pc at home will I have to change anything other than directory name on the windows pc at work.
      On a different note... Is there a way to edit my own reply's? I see where to edit my post. But not my replys.

        If you click on the title of your reply (which is a link) you will get the same style edit page as you do for your original node.

        As a (related) aside, if you make substantive changes to any of your nodes please ensure that you flag the changes so it is clear the content has changed. And please avoid deleting stuff because that often renders replies meaningless.

        True laziness is hard work

      If you've written it in VBA then rewriting in Perl should be a snap! Perl has much better, well everything really, than VBA, but especially string manipulation, control structures and data structures. You'll find Perl is much closer to C++ in many ways than to VBA.

      As I said earlier, hashes are the key. Think STL's map class.

      For standard sorts of stuff Perl is very portable. For what you have described so far you should be able to move your *nix script to a Windows box unchanged. Note that Perl will even "do the right thing" with native line endings so on *nix it uses line feeds and on Windows carriage return line feed pairs when reading and writing files by default. A \n used in regular expressions and string turns into the correct thing for the native OS.

      I suggest you whip up some code than come back for a little criticism. Oh, and always use strictures (use strict; use warnings; - see The strictures, according to Seuss) ;).

      True laziness is hard work
        I agree. I'm working on some right now. Can you point me toward some good references for syntax of loops. Hashes seem to be covered well in the tutorial section. Also I am new here so should I add a reply with code or update my original post? And how do I flag?

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://960895]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (7)
As of 2014-11-24 09:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My preferred Perl binaries come from:














    Results (137 votes), past polls