Thanks Prasanna, that fixed it. -----Original Message----- From: Prasanna Kothari [mailto:[EMAIL PROTECTED] Sent: 06 May 2005 02:26 PM To: beginners@perl.org Cc: Tielman Koekemoer (TNE) Subject: Re: Calling a subroutine - strict very strict
what is "param".? If it's a variable, and not declared, qualify it using "my or local". Else, if it's a string that you want pass to the function, use single quotes. -Prasanna Tielman Koekemoer (TNE) wrote: >Hi All, > >I apologise for the newbie question straight off - I don't have my >Camel book with me to consult. > >Why does the following give me an error?: > >---------------------- >#!/usr/bin/perl -w ># ># A script that gets a list of technologies that have events on Display >layer. ># > >use strict; > >sub q_db { ># Insert command that uses $_[0] >}; > >my @OPD01=q_db(param); >------------------------ > >Error: > >Bareword "param" not allowed while "strict subs" in use at >./get_all_technologies.pl line 17. >Execution of ./get_all_technologies.pl aborted due to compilation >errors. > >TIA! > > > -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>