Have just started learning perl this week and it seems to be going well but I have hit a brick wall. I'm trying to do something I think should be relatively simple, I want to be able to manipulate the output of the free command on linux. All I want to do is read each line into an array so I can play with the values a little.
Is an array the most sensible approach for this? Or should I use a hash? It seems that when I do this the whole lines get put into the first part of the array, lets say $array[0] whereas I want each word to go into each part of the array. I tried using split but can't seem to find the appropriate regex to split on the values.
Can anyone help?
Cheers!
In reply to Splitting output of a system command into an array by sKiBa
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |