First open the file using open: perldoc -f open Then use the filehandle (FILE for instance) to put the first line in $str: $str = <FILE>;
Then if you don't want to do anything else with the file, close it: perldoc -f close -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Wednesday, November 20, 2002 11:35 AM To: [EMAIL PROTECTED] Subject: how can I grab the first line from a text file I know there must be an easy way to do this... help greatly appreciated, Thanks -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]