Link to home
Start Free TrialLog in
Avatar of ambuli
ambuliFlag for United States of America

asked on

Perl: find a word in a line that precedes :

Hi there,

If a line is in the form:

something here IDLE_THREAD: time in 23.2 s

I want to find out the word IDLE_THREAD
Thanks,
ASKER CERTIFIED SOLUTION
Avatar of farzanj
farzanj
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
the \s* makes no difference at all to the results of $line =~ m/\s*([A-Z_]+):/