|more useful options|
Push a tab-delimited line into an arrayby koolgirl (Hermit)
|on Sep 28, 2011 at 13:52 UTC||Need Help??|
koolgirl has asked for the wisdom of the Perl Monks concerning the following question:
Hello Monks :D,
OK, I'm parsing a log file, to match specific lines for billing. Each line has six values (date/time, IP, user name, user id, id number, and message). Each element is tab delimited.
So, my question would be if I store each line into an array, is it going to store six elements per line because of the tab delimiters, or will each line be an element?, as that is how I'm assigning it:
I know this is a basic question, **ducks to avoid the llama book flying at head**, but I've been stuck in web development for a while, so I just don't remember and I searched this question and I all seem to get is documents on split.UPDATE:
As long as I'm asking ridiculous questions, might as well include them all together, so I'm looking through the indexes of O'Reilly's books (I have on CD), and I'm seeing passing variables to subroutines as strings:
If I passed an array to &sub, would it be put into the @_ by element, as $foo and $bar would, or will it all end up in $_?
"The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore all progress depends on the unreasonable man.." -- George Bernard Shaw