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
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
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.
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 $/
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
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
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
#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/
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
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
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
'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]
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
execute?(note suffix '.ext')
tnx!
--
Matija
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
out.
--
Matija
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
tells me that this is a bad thing :)
--
Matija
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
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
\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]
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]
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]
(@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]
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]
) 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]
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
.
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]
.
--
Matija
to know.
--
Matija
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
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
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/
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
=~ /(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
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
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
replacement and
truncation. Do you guys have some idea how to make this work? tnx!
--
Matija
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
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
37 matches
Mail list logo