2013/8/15 Brian Fraser frase...@gmail.com:
On Wed, Aug 14, 2013 at 6:09 PM, Alexey Mishustin shum...@shumkar.ru
I'm sorry only that there is no built-in option with which one could
enable/disable easily assignments inside `if'. (E.g., like re 'eval'/
no re 'eval'). It would provide choices
Hello all,
If I make a typo and write a single equals operator here:
#!/usr/bin/perl
use strict;
use warnings;
my $foo = 1;
my $bar = 2;
if ($foo = 2) {
print yes\n;
}
else {
print no\n;
}
...then the warnings pragma works OK and tells me Found = in
conditional, should be
Hi Jing,
Thanks for the reply.
So, there is no built-in way to catch these typos?
--
Regards,
Alex
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/
Thanks to all,
2013/8/14 Jim Gibson jimsgib...@gmail.com:
The problem is that the construct
if( $foo = $bar ) {
...
is not always a typo. It means: assign value of $bar to variable $foo and
test if the result is logically true, which is perfectly valid. If that were
not allowed,
2013/8/15 Uri Guttman u...@stemsystems.com:
On 08/14/2013 04:22 PM, Jim Gibson wrote:
On Aug 14, 2013, at 12:30 PM, Alexey Mishustin wrote:
Testing a value and assigning it - I have never done this at the same
time...
Doing both in while statements is very common:
while( my $line
5/23/2011, Gang Cheng chenggan...@gmail.com вы писали:
hi,
I instaled my perl under the e:\r_software\perl.
I wrote a hello world programme as below
#! /usr/bin/perl
print “Hello,word!\n”;
and save it under e:\ as perl.p1
but when I run it with the window commend line as
E:\ perl
1/18/2011, John W. Krahn jwkr...@shaw.ca вы писали:
Alexey Mishustin wrote:
1/18/2011, Grantemailgr...@gmail.com вы писали:
I came up with these but they don't seem to work reliably:
/\.google\..*\/imgres\?/
/\.google\..*\/images\?/
/\.google\..*\/products\?/
/(www.){0,1}(google
1/18/2011, Alexey Mishustin shum...@shumkar.ru вы писали:
I meant
(imgres)
OR
(images)
OR
(products)
Uri wrote the correct alternation for that:
(imgres|images|products)
So, I should write
/(www\.){0,1}(google\.).*\/(imgres|images|products)\?{0,1}/
--
Regards,
Alex
--
To unsubscribe
1/18/2011, Uri Guttman u...@stemsystems.com вы писали:
AM == Alexey Mishustin shum...@shumkar.ru writes:
AM /(www.){0,1}(google\.).*\/(imgres)|(images)|(products)\?{0,1}/
{0,1} is just ? by itself.
AM Yes, I know. But I like the {a,b} syntax more :) It's more uniform than
AM
1/18/2011, Uri Guttman u...@stemsystems.com вы писали:
AM == Alexey Mishustin shum...@shumkar.ru writes:
AM I used brackets not for storing but for combining in order to use the
AM combined patterns in alternation.
the point is parens
(the correct term. brackets are [])
Eh... Useful
1/18/2011, Uri Guttman u...@stemsystems.com вы писали:
AM == Alexey Mishustin shum...@shumkar.ru writes:
AM 1/18/2011, Uri Guttman u...@stemsystems.com вы писали:
AM == Alexey Mishustin shum...@shumkar.ru writes:
AM I used brackets not for storing but for combining in order
1/18/2011, Grant emailgr...@gmail.com вы писали:
I'm trying to come up with a regex that will match any Google Images
URL such as these:
www.google.com/imgres
www.google.com/images
google.com/imgres
www.google.co.uk/imgres
www.google.nl/imgres
and a second regex for Google Products
1/18/2011, Alexey Mishustin shum...@shumkar.ru вы писали:
1/18/2011, Grant emailgr...@gmail.com вы писали:
I'm trying to come up with a regex that will match any Google Images
URL such as these:
www.google.com/imgres
www.google.com/images
google.com/imgres
www.google.co.uk/imgres
1/18/2011, Uri Guttman u...@stemsystems.com вы писали:
AM == Alexey Mishustin shum...@shumkar.ru writes:
AM /(www.){0,1}(google\.).*\/(imgres)|(images)|(products)\?{0,1}/
{0,1} is just ? by itself.
Yes, I know. But I like the {a,b} syntax more :) It's more uniform than
?,+,* etc.
you
11/19/2010, Chap Harrison c...@pobox.com вы писали:
Hi folks,
The current version of Ubuntu Linux I'm using comes with Perl 5.10.1, but I
want to install and develop under 5.12.2. From what I've read in Perlmonks
and Stackoverflow, it's not difficult to install a separate version - all it
10/13/2010, han sun sunhan...@gmail.com you wrote:
Math::BigInt::couldn't load specified math lib(s), fallback to
Math::BigInt::FastCalc at C:/Program Files/Perl/Site/site/lib/Crypt/DH.pm
line 6
I have google the problem,but still haven't worked it out.
It's too late, I have to go to sleep.
If
10/13/2010, han sun sunhan...@gmail.com you wrote:
2010/10/12 Irfan Sayed irfan_sayed2...@yahoo.com
now getting following error:
Key class 'Net::SSH::Perl::Key::RSA' is unsupported: Cannot find current
script
'./igor_tar.pl' at /home/y/lib/perl5/5.8/FindBin.pm line 188
BEGIN
10/12/2010, Irfan Sayed irfan_sayed2...@yahoo.com you wrote:
i am using this code :
my $host = abc.data.com;
my $user = ybici1;
my $id_file = /home/ybici1/.ssh/openid;
my $ssh = Net::SSH::Perl-new($host,$user,$id_file);
my($stdout, $stderr, $exit) = $ssh-cmd(ls /homes/ybici1);
print
2.10.2010, 13:57:54, jobst müller wrote:
#!/usr/bin/perl
use strict;
use warnings;
use diagnostics;
use File::Find::Rule;
my @files = File::Find::Rule-file()
-name('*.html')
-in( 'home/usr/perl/html.files' );
-in( '/home/usr/perl/html.files' );
foreach my $file(@files) {
print
2.10.2010, 15:22:03, Alexey Mishustin wrote:
2.10.2010, 13:57:54, jobst müller wrote:
#!/usr/bin/perl
use strict;
use warnings;
use diagnostics;
use File::Find::Rule;
my @files = File::Find::Rule-file()
-name('*.html')
-in( 'home/usr/perl/html.files' );
-in( '/home/usr/perl
9/23/2009, Shlomi Fish shlo...@iglu.org.il вы писали:
Is there a perl tool for converting mbox files to MH directories?
[snip]
Try the Mail::Box module:
http://search.cpan.org/dist/Mail-Box/
It seems to still be the best of breed in this regard from what some
authoritative sources in the
21 matches
Mail list logo