Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: Processing words in a file.

by frozenwithjoy (Priest)
on Feb 12, 2013 at 07:10 UTC ( #1018308=note: print w/replies, xml ) Need Help??


in reply to Processing words in a file.

Are you interested in checking all strings or just the first string? Could you include a few lines from an actual file and indicate your desired output? Thanks!

Replies are listed 'Best First'.
Re^2: Processing words in a file.
by brtch (Initiate) on Feb 12, 2013 at 07:16 UTC
    Intrested in all strings....
      Also, I need a condition like this: If, $first_word == xyz, followed by if $second_word == abc as the lines have same format, I want the loop to be on a per line basis. ---LOOP SHOULD BE ON PER LINE BASIS

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1018308]
help
Chatterbox?
[1nickt]: For multiple dirs use iterator(): $it = path("/foo")-> iterator; while ( my $path = $it->() ) {...}
[1nickt]: (also skips . and .. automatically, and follows subdirs if you set <c\>recurse => 1</c>
[1nickt]: $it = path("/foo")-> iterator(recurse => 1 );

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (13)
As of 2017-03-28 18:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Should Pluto Get Its Planethood Back?



    Results (340 votes). Check out past polls.