cels9
asked on
Text file word search
I have a text file called cool.txt:
lovelovelove.com Cool1
painpainpain.com Cool2
expertexpert.com Cool2
I want this: perl script.pl cool.txt cool1 cool1.txt
the script search the world cool1 in the file cool.txt and creat a file called cool1.txt and past the site(only the site).
cool1.txt:
lovelovelove.com
tnx.
lovelovelove.com Cool1
painpainpain.com Cool2
expertexpert.com Cool2
I want this: perl script.pl cool.txt cool1 cool1.txt
the script search the world cool1 in the file cool.txt and creat a file called cool1.txt and past the site(only the site).
cool1.txt:
lovelovelove.com
tnx.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
You might also want to be aware of possible metacharacters in $text