From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
[EMAIL PROTECTED]
Sent: 11 April 2006 07:16
To: [EMAIL PROTECTED]
Cc: [email protected]
Subject: Re: messy regex

> i think i see what has happened.   i intended the code and the test
data to go into two
> separate files, but it seems you have put everything into the same
file.    sorry i
> was not more clear about this.   i intended the test code to be
invoked like this:   
>  
>     perl  test_code.pl  test_data.dat   
>  
> if the code and data are placed in separate files, the perl code will
open the
> data file and process the data line by line, with each line being a
listing.   

Actually, it is easier if the code and test data are in the same file
for instances like this. That is what the __DATA__ tag, and the DATA
file handle are for. See 'perldoc perldata' for more info.

HTH

-- 
Brian Raven 

______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
______________________________________________________________________

_______________________________________________
ActivePerl mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to