Re: Smart matching

2011-01-18 Thread Vladimir D Belousov
19.01.2011 0:43, Brian Fraser пишет: The smart match is no longer commutative - That was removed after 5.10.1, I think. http://www.learning-perl.com/?p=32 http://perldoc.perl.org/perlsyn.html#Smart-matching-in-detail Brian. Thank you! -- To unsubscribe, e-mail: beginners-unsubscr...@perl.or

Re: Smart matching

2011-01-18 Thread Vladimir D Belousov
19.01.2011 0:09, Uri Guttman пишет: but why don't you just call exists on the hash key? there is no win to using smart matching for that. it is included for consistancy but it isn't needed for hash keys. I just want to understand how does it work :) -- To unsubscribe, e-mail: beginners-uns

Smart matching

2011-01-18 Thread Vladimir D Belousov
I'm trying to check whether the given key exists in the hash. The simple example: use feature ':5.10'; my %a = (a => 1, b => 2); say %a ~~ 'a' ? 'YES' : 'NO';# says NO -- why? say %a ~~ 'c' ? 'YES' : 'NO';# says NO say 'a' ~~ %a ? 'YES' : 'NO';# says YES say 'c' ~~ %a ? 'YES' : 'NO';

Re: Graphic files visual modofocation in Perl

2005-05-24 Thread Vladimir D Belousov
Chris Devers wrote: On Tue, 24 May 2005, Vladimir D Belousov wrote: Whether there is a modules for geometry transformation of the images? In particular, I need rotate and change geometry (perspective, resize)? Yes. ImageMagick is the most common way to do this. It's a toolki

Graphic files visual modofocation in Perl

2005-05-24 Thread Vladimir D Belousov
Hallo all! I beg your pardon for this question - the question more theoretical, rather than practical. Whether there is a modules for geometry transformation of the images? In particular, I need rotate and change geometry (perspective, resize)? Thanks a lot for any answers! -- Vladimir D

Re: MIME::Lite HTML email

2005-05-14 Thread Vladimir D Belousov
and how can I get rid of it: Content-type: text/html Content-transfer-encoding: binary Content-disposition: inline Content-length: 155 Thanks, Mark -- Vladimir D Belousov -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/>

Re: Finding comment tags

2005-05-13 Thread Vladimir D Belousov
l be, a langua] -- Vladimir D Belousov HiTech solutions for business http://businessreklama.ru -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>

Re: Number of Items in Array

2005-04-18 Thread Vladimir D Belousov
John Doe wrote: Am Montag, 18. April 2005 10.53 schrieb Vladimir D Belousov: Charles K. Clarkson wrote: Aaron C. de Bruyn <mailto:[EMAIL PROTECTED]> wrote: : In the Perl documentation (perlintro) it says that you can find out : the number of elements in an array using the following

Re: last question on the switch statement ....

2005-04-18 Thread Vladimir D Belousov
CSSDGopen' && do { $rep = "QCSS Data Generator"; last SWITCH; }; $_ eq 'IWopen' && do { $rep = "I/Watch"; last SWITCH; }; ##etc## -- Vladimir D Belousov -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>

Re: Number of Items in Array

2005-04-18 Thread Vladimir D Belousov
rles K. Clarkson -- Vladimir D Belousov -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>

MIME::Lite attachments encode

2005-04-10 Thread Vladimir D Belousov
Hallo all! I'm using MIME::Lite to create multipart/mixed messages. But I have the problem with attach() method - I have already encoded attachments and do this: use MIME::Lite; ... sub create_message { my $self=shift; $MIME::Lite::AUTO_ENCODE=0; . my $msg = MIME::Lite->new(.);

Re: How can I take subarray without second array (drop other elements)?

2005-04-07 Thread Vladimir D Belousov
y may be very big and I wish to avoid excessive copying of data. Therefore I don't want use splice function. Jay Savage wrote: On Apr 7, 2005 8:54 AM, Vladimir D Belousov <[EMAIL PROTECTED]> wrote: Hallo, all! I have a function which prints array: sub print_array { my $array_r

Re: How can I take subarray without second array (drop other elements)?

2005-04-07 Thread Vladimir D Belousov
John Doe wrote: Am Donnerstag, 7. April 2005 14.54 schrieb Vladimir D Belousov: Hallo, all! Hi Wim has already presented the solution for your problem; [...] I do this: $#array = $N+100; print_array($array[$N]); this should be print $array->[$N] I see, but $array here

How can I take subarray without second array (drop other elements)?

2005-04-07 Thread Vladimir D Belousov
Hallo, all! I have a function which prints array: sub print_array { my $array_ref = shift; for(@$array_ref){ print "$_\n"; } } And I have a big array, for example named @array. I want to print @array elements from N to N+100 using this function, but don't want to use second array (they are

Re: Directory fastscan

2005-03-15 Thread Vladimir D Belousov
ry until any [sub]directory found return 1 if (lstat)[1] & 004 && $_ !~ /^\.+/; } return 0; //No subdirs found. } And for example: chdir("/path/to/dir/"); print "/path/to/dir has ".(is_node("./") ? "" : "not").&quo

Directory fastscan

2005-03-15 Thread Vladimir D Belousov
]directory found return 1 if (lstat)[1] & 004 && $_ !~ /^\.+/; } return 0; //No subdirs found. } And for example: chdir("/path/to/dir/"); print "/path/to/dir has ".(is_node("./") ? "" : "not")." directory(s)\n";

VFS_VGET(9) in perl

2005-03-14 Thread Vladimir D Belousov
Is it possible in perl to get the reference to object of file system, if I have inode? Equivalent VFS_VGET(9) for example? -- Vladimir D Belousov HiTech solutions for business http://businessreklama.ru -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED

Re: Invalid data-time stamps

2005-03-07 Thread Vladimir D Belousov
Hallo! Try to change directory to "$ARGV[0]" before open: chdir($ARGV[0]) || die "Cannot change dir: $!\n"; opendir $DIRHANDLE, "./"; . And (may be) It is better to use lstat(2) instead of stat(2) ? In this case there will be correct dates of symbolic links. Bret Goodfellow wrote: Hi all, I am

Re: Returning to my program after exiting vi.

2005-03-07 Thread Vladimir D Belousov
That's right, but you should better use my $viRetValue = system("command", "string"); In this case the command interpreter will not be used and that is more safe. Rathna N wrote: You should be able to do it, by waiting for the return value. Ex: viRetValue=system("Comnnad String"); or viRetValue =

Re: encoding script pain

2005-03-04 Thread Vladimir D Belousov
ter the system command and returns to the shell......what could be the reason??? some1 plz help me thnx in adv Saurabh -- Vladimir D Belousov HiTech solutions for business http://businessreklama.ru -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>

Case-operator

2005-02-28 Thread Vladimir D Belousov
Hallo! Is in the perl operator like C/C++ 'case' ? -- Vladimir D Belousov HiTech solutions for business http://businessreklama.ru -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>

Re: Verify that a directory exists.

2005-02-28 Thread Vladimir D Belousov
Perl and other programming languages. I want to verify that a directory exists, but I don't know the way tho do it. Regards. -- Vladimir D Belousov HiTech solutions for business http://businessreklama.ru -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [E

Re: Cannot connect

2005-02-21 Thread Vladimir D Belousov
MySQL 4.1 and hiegher require different auth methods than older versions. You have to upgrade your DBI.pm && DBD/mysql.pm. In the other way you may reset the password(s) to the old style: mysql> SET PASSWORD FOR -> '/|some_user|/'@'/|some_host|/' = OLD_PASSWORD('/|newpwd|/'); Follow this link: h

Re: Perl waits for while to finish before printing if on the same line, why?(countdown prog)

2005-02-21 Thread Vladimir D Belousov
Charles K. Clarkson wrote: Harold Castro <[EMAIL PROTECTED]> wrote: : my $countdown = 5; : while ($countdown > 0){ : print "\."; No need to escape the period in a double quoted string. : sleep 1; : $countdown--; : } : print "Kaboom!!" : : And the result.. : after waiting for 5 seconds, it displ