| [reply] [d/l] [select] |
Thanks a lot!
I can very well understand the logic of parsing the
csv file.
The error which I got was :
Backticks found where operator expected at wmic.pl line 11, at end of
+line
(Missing semicolon on previous line?)
syntax error at wmic.pl line 11, near "], `wmic process list full /for
+mat"
(Might be a runaway multi-line // string starting on line 6)
Can't find string terminator "`" anywhere before EOF at wmic.pl line 1
+1.
I am using perl version 5.18.
But I made an alternative code to redirect the stdout of the wmic command to an array and got the output in a text file. The only thing I am was not able to understand was the
text parsing logic using the map function. Now got it.
Many thanks, once again! | [reply] [d/l] |
Hi,
I have still one more doubt in your code .
1.What does the 1+ before indexing function signify ?
2.What is the string actually compared to $0?
Thanks,
Bala.
| [reply] |
What does the 1+ before indexing function signify ?
What do the docs say that index returns?
.What is the string actually compared to $0 ?
I already told you: the first value in the anonymous array.
And just above that I said: "extracts the second and 25th fields, which are the command line text and the process id respectively. And places those two fields from each line into its own anonymous array.".
If you work backward, you should be able to work it out.
With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
| [reply] |