in reply to Formatting Output from system commands
How about (untested)
to run net config, search it for the string User name, and grab the stuff from the other end of that line (which is put back into your variable). (The m modifier makes ^ and $ match the start and end of lines, rather than the start and end of strings.)my ($me)=`net config`=~/^User name\s+(.*)$/m;
--
Tommy
Too stupid to live.
Too stubborn to die.
|
|---|