in reply to Passing 2 elements into a new associative array

First, check the syntax for open(). I don't think you're doing what you think you're doing.

Second, I'm not quite sure what you're trying to do. You need to be more clear as to what you're trying to match in $csv and how you want to match them.

Being right, does not endow the right to be rude; politeness costs nothing.
Being unknowing, is not the same as being stupid.
Expressing a contrary opinion, whether to the individual or the group, is more often a sign of deeper thought than of cantankerous belligerence.
Do not mistake your goals as the only goals; your opinion as the only opinion; your confidence as correctness. Saying you know better is not the same as explaining you know better.

  • Comment on Re: Passing 2 elements into a new associative array

Replies are listed 'Best First'.
Re^2: Passing 2 elements into a new associative array
by contrite_newbie (Novice) on Oct 07, 2004 at 04:25 UTC
    u r right...but the fh isn't the problem...:-)
      u r right...but the fh isn't the problem...:-)

      I have a feeling this is going to get me downvotes, but it's for your own good, ya hear!

      How hard is it to write out "You" and "are"? You avoided pressing 4 keys on your keyboard, and as a result you look silly and childish. There are some people who don't mind "u r", but I do, and I know others who feel the same. Please, at least try to humor us. It's really not that hard.

      More substantively, the FH may not be "the" problem in your mind, but it's still a problem. When you paste code, it's a large part of communicating your problem. When your code has errors other than the one you want help with, people are going to get distracted, and ignore the thing you're actually asking about. Thus, it's in your own best interest to post code that is as correct as possible. I know this from experience. Testing a 5 line snippet before posting is not that difficult, so do it!

        How about this instead? You are correct in your observation of the open statement in my sample. In my hurry to clean it up I removed all literal filenames and handles so as not to obfuscate the issue.

        The FH has been cleaned up to:

        open (my $FILE, 'c:/test/ldif.ldf') || die "can't open 'ldif.ldf': $!";

        open (my $OUTPUT_FILE, '>export.txt') || die "can't open 'export.txt': $!";

        open (my $FILE1, 'c:/test/some.csv') || die "can't open 'some.csv': $!";

        The reality of your comment is that it is more than a bit anal, but I do understand the need for clarity in these matters and I do appreciate the candid response.

        Sometimes we don't have the time we need to make things pretty.