in reply to Suggestion on rewriting small code
Try sprintf.
use strict; use warnings; my @arr = (12341,1245125,1525125,125125125); my $str = sprintf 'job==%d || 'x(@arr-1) . 'job==%d', @arr; print "$str\n";
Bill
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Suggestion on rewriting small code
by AnomalousMonk (Archbishop) on Aug 21, 2019 at 15:21 UTC | |
by BillKSmith (Monsignor) on Aug 21, 2019 at 18:14 UTC | |
by AnomalousMonk (Archbishop) on Aug 21, 2019 at 20:04 UTC |
In Section
Seekers of Perl Wisdom