> -----Original Message----- > From: AMORE,JUAN (HP-Roseville,ex1) [mailto:[EMAIL PROTECTED]] > Sent: Thursday, October 04, 2001 5:13 PM > To: Beginners@Perl. Org (E-mail) > Cc: AMORE,JUAN (HP-Roseville,ex1) > Subject: Trying to search for a file and display its contents > to screen! > > > Hello Anyone! > The below file is giving some strange error. > I'm trying to search for a file and display its contents. > I'm using the following script below.... > Do's anyone know a simple script besides the one I have written. > > Best Rgds; > > Juan; > > > > Use of implicit split to @_ is deprecated at proj2_1.pl line 13. > # > # > while (<>) { > print if > (qw/file/); > }
You don't want qw// (quote words), you wan't m// (match regex) Both are documented in perldoc perlop The error message is because qw/file/ is equivalent to split(/ /, 'file'), but you're using it in a scalar context, which is deprecated (see perldoc -f split). -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]