Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re^2: Hidden Secrets of PERL

by Hue-Bond (Priest)
on Oct 12, 2006 at 10:24 UTC ( [id://577797]=note: print w/replies, xml ) Need Help??


in reply to Re: Hidden Secrets of PERL
in thread Hidden Secrets of PERL

My $qm = '?,'x scalar(@allsearchterms);

The argument at the right of x is in scalar context, so no need to call scalar. Besides it, you can use join to get rid of the chop:

my $qm = join ',', ('?') x @allsearchterms;

--
David Serrano

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others admiring the Monastery: (7)
As of 2024-04-24 09:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found