Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re^3: Accessing variables

by Krambambuli (Deacon)
on Feb 02, 2010 at 08:52 UTC ( #820914=note: print w/ replies, xml ) Need Help??


in reply to Re^2: Accessing variables
in thread Accessing variables

Maybe your code should look somewhat like

#!/usr/bin/perl my ($file1,$file2); open(FILE1,"<$ARGV[0]"); while(<FILE1>) { chomp($_); $file1 = $_; $file1=~s/\s+//; open(FILE2,"<$ARGV[1]"); while(<FILE2>) { print "<$file1> \n"; } close FILE2; }
?

What output do you wish or expect?


Krambambuli
---


Comment on Re^3: Accessing variables
Download Code
Re^4: Accessing variables
by pavanmach (Novice) on Feb 02, 2010 at 11:52 UTC
    haai, Actually i need to check whether each line of file1 matches with any line in file2. Thanks & Regards, Pavan

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://820914]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (5)
As of 2014-10-22 05:28 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    For retirement, I am banking on:










    Results (112 votes), past polls