Re: Hash of Arrays

2005-09-20 Thread Matija Papec
Christopher Spears wrote: while ($line = ) { ($who, $rest) = split /:\s*/, $line, 2; @fields = split ' ', $rest; $HoA{$who} = [ @fields ]; } The part that confuses me is: ($who, $rest) = split /:\s*/, $line, 2; I understand that it takes the input and splits it into two parts

Re: Can't figure out Error.pm

2005-09-18 Thread Matija Papec
Peter Rabbitson wrote: I then tried to change it in the following way, but I get an error: Can't locate object method catch via package DBException (perhaps you forgot to load DBException?) at ./testerror line 16. ^^^ It seems that you're missing use

Re: naming subroutine reference parameter?

2005-09-07 Thread matija
Jeff Pan wrote: my (%hash,@array); sub_test(\%hash,[EMAIL PROTECTED]); has special meaning so it should be dropped when not needing particular special behavior. I can't understand for this,can u give me some examples? perldoc perlsub -- NAME(LIST); # Circumvent prototypes.

Re: infile data

2005-09-06 Thread Matija Papec
Tom Allison wrote: I've been using the practice of putting something at the bottom of a file for holding static data, like SQL, by calling a __DATA__ handle: my $sql = join('',(DATA)); #more efficient my $sql = do { local $/; DATA }; check perldoc perlvar if you want to know more about $/

Re: naming subroutine reference parameter?

2005-09-06 Thread Matija Papec
Jeff Pan wrote: Passing reference as parameter to subroutine is as easy as the normal way.And,if u pass some types of parameter such as hash,array,or handle to subroutine,using reference instead is more safer. for example,such below code is right: It is, however it could be better. my

Re: How do you force SOAP::Lite to use document/literal SOAP messages?

2005-09-06 Thread Matija Papec
David Adams wrote: I am trying to write a simple SOAP client written in perl and to talk to a webservice written in .NET. I am unsuccessful. I believe the web service is expecting document/literal SOAP messages but I think the SOAP::Lite module sends stuff in RPC/encoded messages. Is

Re: getting the value of a var

2005-08-28 Thread Matija Papec
Octavian Rasnita wrote: my $module = Teddy::Languages::${lang}::${mod}; eval require $module; Then I want to print that value, but I don't know how. I have tried: print Teddy::Languages::$lang::$mod::content; print $module::content; I am missing something and I cannot make it work. Please

Re: getting the value of a var

2005-08-28 Thread Matija Papec
#symbol table my $st = eval '\%$module::'; correction, my $st = eval '\%'. $module .'::'; # scalar reference $sref = *{ $st-{content} }{SCALAR}; print $$sref; -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Re: Analyze Log

2005-08-11 Thread Matija Papec
Nick wrote: Hi There, I am trying to analyze a simple log file and pull 2 pieces of data from it. The log looks as follows: www.example.com 42f3ca1042f8c42f0 73380 3638 Where each valie is tab seperated. I want to create a hash with www.example.com

Re: __DATA__ Token Problem

2004-07-05 Thread Matija Papec
Bastian Angerstein wrote: I have a few questions regarding to the DATA Filehandle: 1. This handle ist opend by default or do I have to open it by myself? 2. Is it possible to change to content of what the handle so that the __DATA__ Sektion of my skript changes? 3. Can I delete anything data from

Re: A few questions

2002-07-11 Thread Matija Papec
will get a warning here print @I_care_about_these\n; /code This should print out qr st uv\n Tnx, I was using split but thought that single regex would be more optimized and shorter for this kind of task. :) -- Matija -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail

A few questions

2002-07-10 Thread Matija Papec
'john236' RLIKE NAME; is not recognized as a valid sql query. :! -- Matija -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: CGI scripts security

2001-11-27 Thread Matija Papec
that bit out, you'll be back for a way of untainting your data ;-) We'll be waiting! Tnx, I've read somewhere about -T switch but right now don't have time to toy with, variable filtering works nicely. -- Matija -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL

CGI scripts security

2001-11-26 Thread Matija Papec
execute?(note suffix '.ext') tnx! -- Matija -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: cgi

2001-11-26 Thread Matija Papec
out. -- Matija -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

'' and

2001-09-11 Thread Matija Papec
tells me that this is a bad thing :) -- Matija -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: PERL IS NOT A HIGH LEVEL LANGUAGE and What is a Script

2001-08-19 Thread Matija Papec
like compile at runtime language(like C or any other with one downside? where compiling is done many times). [1] by interpreted I mean translated and executed line by line, by some kind of program -- Matija -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL

Netscape 4.xx and caching problem

2001-08-10 Thread Matija Papec
\n\n; print Content-type: image/png\n; print Cache-Control: max-age=1, must-revalidate\n\n; -- Matija -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: arrays

2001-07-31 Thread Matija Papec
appropriate attribute for such thing, thought that array of empty strings is good idea. -- Matija -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: arrays

2001-07-31 Thread Matija Papec
and weaknesses. Can you explain where are these strengths(which one is the fastest?) -- Matija -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

arrays

2001-07-30 Thread Matija Papec
(@temp, @data); # block for optimization for $i (0..$#datumi2) { push @temp, } push @data, \@temp; undef @temp; # end of block for optimization push @data, \@datumi2; . . . -- Matija -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: arrays

2001-07-30 Thread Matija Papec
to avoid X values being drawn, so there is a need for array where all elements are . -- Matija -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

GD:Graph

2001-07-27 Thread Matija Papec
) and little darkblue bars by right Y(volumen). If you have some experience with gd:graph or some suggestions, please speak. :) -- Matija -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

math

2001-07-20 Thread Matija Papec
I've read somewhere that perl internally uses only doubles. Does this mean that FPU is always used when working with numbers, regardless to the fact that I'm using only integer calculations? (is there a way to force internal use of integers on some variables?) -- Matija -- To unsubscribe, e

Re: question about sort

2001-07-20 Thread Matija Papec
. Isn't this array thing redundant in this case where we only take zero element? (I can only think of forcing a particular context with such action) -- Matija -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: MID in Visual Basic...

2001-07-12 Thread Matija Papec
. -- Matija

Re: the right way

2001-07-10 Thread Matija Papec
to know. -- Matija

Re: the right way

2001-07-10 Thread Matija Papec
excessive indentation caused by another block of curlies, though with such a Yes, although I like conditions on the first place thus, y() if $y; could be replaced by: $y 0 and y(); So, to answer your question, it depends largely on the code your writing, but mostly on someone's style. tnx. -- Matija

the right way

2001-07-09 Thread Matija Papec
I'm curious which of the two examples is more preferred or it depends entirely on someone style? $x = 1; #1) if ($x) { $x = 0 } #2) $x = 0 if $x; IMO first is more convenient and orthodox but that is just me. :) -- Matija

Re: Editor

2001-07-07 Thread Matija Papec
Message- From: Matija Papec [mailto:[EMAIL PROTECTED]] Sent: Friday, July 06, 2001 3:06 PM To: [EMAIL PROTECTED] Subject: Re: Editor -- AMD FAQ http://performancefiles.cjb.net/

Re: simple regexp

2001-07-06 Thread Matija Papec
Matija Papec [EMAIL PROTECTED] wrote: cut Array is a text file with lines as its elements. It looks like: --txt file-- # ARIN: Aworldwidemall.com, VA - US ALL: 63.64.190.230 # ARIN: Aworldwidemall.com, VA - US ALL: 67.64.190.230 . . . . # ARIN: Aworldwidemall.com, VA - US ALL

Re: simple regexp

2001-07-06 Thread Matija Papec
=~ /(blahblah)/g ) in order to evaluate second blahblah from $line. If I use $1 and $2, *only* $1 get filled, don't know why.. -- Matija

Re: Editor

2001-07-06 Thread Matija Papec
Aigner-Torres, Mario [EMAIL PROTECTED] wrote: Hi Bill, my choice is gnuemacs Does it support script debugging? I'm looking for nice *nix editor /debugger with breakpoints, step execution, etc. Have you tried PerlComposer? with cperl! What is cperl? -- Matija

Re: Editor

2001-07-06 Thread Matija Papec
anton [EMAIL PROTECTED] wrote: I've listen to you all about the editors problem ? Is anybody out there still using the old bottom-dweller vi ? On Fri, 06 Jul 2001 14:48:53 +0200, Matija Papec [EMAIL PROTECTED] wrote: Aigner-Torres, Mario [EMAIL PROTECTED] wrote: Hi Bill, my choice

simple regexp

2001-07-04 Thread Matija Papec
replacement and truncation. Do you guys have some idea how to make this work? tnx! -- Matija

Re: simple regexp

2001-07-04 Thread Matija Papec
ALL:163.64.190.230 --txt file-- Array is already sorted by IP, so I have to insert a new record somewhere(i.e. 65.64.190.230 between 1st and 2nd record) and write a whole array back to the file. -- Matija

whoami?

2001-06-26 Thread Matija Papec
Greetings, is there a more elegant way to find out who is running a script? %ENV is not reliable and it doesn't contain USER when booting the system, and whoami is external command(yuck :) ) tnx! -- Matija