On Sun, Jul 22, 2012 at 11:09:10PM +0200, Jenda Krynicky wrote:
> From: Paul Johnson
> > You need a mixture of the two approaches: map to prepend "not in:" and
> > join to join them.
> >
> > my $query = join " and ", map "not in:$_", @folders;
>
>
> @folders = ('one', 'two');
> my $query = "n
From: Paul Johnson
> You need a mixture of the two approaches: map to prepend "not in:" and
> join to join them.
>
> my $query = join " and ", map "not in:$_", @folders;
@folders = ('one', 'two');
my $query = "not in:" . join( " and not in:", @folders);
print $query;
will be quicker. no need
On 2012-07-19 12:37, punit jain wrote:
if( @folders ) {
map {$query .= "not in:$_ and"; } @folders;
print "\n $query \n";
}
'if' is not a function, so put a white space after it.
But in this case you don't need the 'if' at all.
Don't use map in void context.
Alternative code
Hi punit,
see below for my response.
On Thu, 19 Jul 2012 16:07:49 +0530
punit jain wrote:
> Hi ,
>
> I am doing a concat operation in Perl for a string like below : -
>
> if( @folders ) {
>
> map {$query .= "not in:$_ and"; } @folders;
> print "\n $query \n";
>
> }
1. "use str
On Thu, Jul 19, 2012 at 04:07:49PM +0530, punit jain wrote:
> Hi ,
>
> I am doing a concat operation in Perl for a string like below : -
>
> if( @folders ) {
>
> map {$query .= "not in:$_ and"; } @folders;
> print "\n $query \n";
>
> }
>
> @folders contain - Inbox, Sent
>
> Outpu
Sayed, Irfan (Irfan) am Montag, 12. Februar 2007 17:05:
> Hi All,
>
> I need to concatenate specific string for each element in the array. I
> tried in the following way with the help of join operator.
Hi Irfan,
you already got hints about the error and the two famous 'use' lines that make
life
one option:
@mail= ("here","there","everywhere");
foreach $Mine (@mail)
{
$str1=$Mine . '@cbc.com';
print "$str1\n";
}
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
-
sg
Sayed, Irfan (Irfan) wrote:
Hi All,
I need to concatenate specific string for each element in the array. I
tri
On 2/12/07, Sayed, Irfan (Irfan) <[EMAIL PROTECTED]> wrote:
Hi All,
I need to concatenate specific string for each element in the array. I
tried in the following way with the help of join operator.
foreach (@mail)
{
my $str1=$_;
$str1=$str1 . "@abc.com";
"@abc.com" is an interpolating strin
>foreach (@mail)
>{
> my $str1=$_;
> $str1=$str1 . "@abc.com";
> print "$str1\n";
>
>}
>
>But somehow it is not getting concateneted.
>
Hi,
replace:
$str1=$str1 . "@abc.com";
to:
$str1 .= '@abc.com';
I think that would work.
In your case,"@abc.com" has been parsed by Perl as an array.
Try this
print NEW_FILE "$C'$A'$B";
-Paresh.
At 08:01 PM 4/8/2002 +0100, Ho, Tony wrote:
>Hi guys
>I was wondering if you could help me.
>In my perl code, I am reading a file with the following line:
>
>123000
>
>There are 3 spaces before 123000.
>I unpack the values into 2 variables, A an
On Monday, April 8, 2002, at 12:01 PM, Ho, Tony wrote:
> Hi guys
> I was wondering if you could help me.
> In my perl code, I am reading a file with the following line:
>
>123000
>
> There are 3 spaces before 123000.
> I unpack the values into 2 variables, A and B
> A is assigned the 3 spac
Hi,
You can do like this:
cat file1.ps >> file2.ps (file2 has all the pages from file1 and file2)
ps2pdf file2.ps file2.pdf
Hope this helps
Senthil
On Thu, 6 Dec 2001 [EMAIL PROTECTED] wrote:
> Hello,
>
> Is there a script based routine for concatenation
> postscript or pdf files?
>
> So
Use the string concatenation operator .
$string = $year."-".$month;
HTH
Will
-- Original Message --
>Hi friends,
> Is there a way to concatenate 2 arguments in one string using
>Perl like for eg $year and $month where
>$year=01
>$month=06
>and I want the result as a string 06-01 using Pe
Sure,
$date = "$month-$year";
Craig
[EMAIL PROTECTED]
Pager
Numeric: 1-877-895-3558
Email pager: [EMAIL PROTECTED]
--
You will never find time for anything.
If you want time, you must make it.
Charles Buxton
- Original Message --
Personally, i prefer
$date="$month-$year";
You could also use
$date=join '-', $month, $year;
but that's a little more awkward.
-Original Message-
From: John Edwards [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, July 24, 2001 9:46 AM
To: 'shweta shah
Use a . to concatenate strings:
$year = "01";
$month = "06";
$date = $month . "-" . $year;
print $date;
HTH
John
-Original Message-
From: shweta shah [mailto:[EMAIL PROTECTED]]
Sent: 24 July 2001 15:44
To: [EMAIL PROTECTED]
Subject: Concatenation
Hi friends,
Is there a way to c
16 matches
Mail list logo