Antwort: [Perl-unix-users] What am I doing wrong here...?

2006-03-06 Thread Georg . Mavridis
Hi Arijit, >I am just wondering...what am I doing wrong here. Why isn't "$latest_CPU_load\n" printing the desired value like $top_output[2] grep returns an array which in scalar context evaluates to the number of elements in there. (There is one line containing 'load average') >Any help her

Antwort: RE: [Perl-unix-users] Using variables in a library path

2006-03-01 Thread Georg . Mavridis
Hi Peter, > > push @INC, "$BASE_PATH/scripts/common"; > > Doesn't this only work within a BEGIN {} block? No this works outside of beginblocks too -- but as use "statements" are executed at the same time with BEGIN {} blocks this statement wont affect them. (But it would be usefull to the requi

Antwort: [Perl-unix-users] Using variables in a library path

2006-02-28 Thread Georg . Mavridis
Hi Vladimir, This code Our $BASE_PATH = '\web_test\'; Use lib $BASE_PATH.'scripts\common\'; Require 'header.pl'; can't work as use "statements" are executed by perl before of the rest of the code. The most common way 2 solve this problem is 2 use constants: use constant BASE_PATH => '\web_te

Antwort: [Perl-unix-users] regex numerical matching w/comma seperated list support

2005-06-10 Thread Georg . Mavridis
        if ($value =~ /^[0-9]+(,[0-9]+)?$/) { HTH George BTW use \d instead of [0-9].___ Perl-Unix-Users mailing list Perl-Unix-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Antwort: [Perl-unix-users] regex numerical matching w/comma seperated list support

2005-06-10 Thread Georg . Mavridis
Oops -- mistyped:         if ($value =~ /^[0-9]+(,[0-9]+)*$/) { should be correct i think. Sorry :( George___ Perl-Unix-Users mailing list Perl-Unix-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Antwort: [Perl-unix-users] @ISA question

2004-11-09 Thread Georg . Mavridis
 {  @ISA = ("TYPEC");  } should do the job. >the read method that gets invoked is not present in the >dlog module, but should be inherited from TYPEA.pm, etc. >however perl is telling me that it can't find it.  any idea why? Yes, Perl i

Antwort: [Perl-unix-users] Some help with strings

2004-04-05 Thread Georg . Mavridis
Hi John, You forgot at least a backslash, $string =~ s/\|+/\|/g; Should do the job. HTH George ___ Perl-Unix-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Antwort: [Perl-unix-users] Parallel Command Execution

2003-12-11 Thread Georg . Mavridis
Hi, I am not sure, but adding an & at the end of the command should put it into background i guess. I mean using system ("$scancmd &") instead of system ($scancmd) HTH George ___ Perl-Unix-Users mailing list [EMAIL PROTECT

Antwort: [Perl-unix-users] Perl confusion

2003-07-22 Thread Georg . Mavridis
ssage', $source_dir_name, $source_id, $data_dir_name); HTH Georg Mavridis ___ Perl-Unix-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Antwort: [Perl-unix-users] testing if a class constant is defined e.g. anoptional constant?

2003-06-19 Thread Georg . Mavridis
Hi, use constant creates a function, so my $item_a=eval {$class_a->CONSTANT_ITEM();}; should do the job. HTH Georg Mavridis ___ Perl-Unix-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs