#perl - Wed 28 Mar 2007 between 09:30 and 09:36



Teppichanno: I use systemname as key, and a error-message as value... this information-pair is stored every occurence
gnubef3ew, Seems like a lot more overhead but maybe that is the way to go.
f00li5hperhpas you would be interested in File::Temp
Teppich: not in a hash it isn't
gnubef00li5h, I thought everything that I create should go there?
f00li5hgnube: pardon?
Davemancopters.
annoTeppich: multiple times for the asme system name? then you're not using a hash
gnubeWell, I am copying a file owned by root (i.e. /var/log/apache/accless.log) and I cannot read it so I copy it to temp and parse it there.
joepI'll sign off. Will come back later.
f00li5heval: %h = ( foo => bar , baz => quux, foo => spam ); \%h
buubotf00li5h: {baz => 'quux',foo => 'spam'}
Teppichanno: but I am trying to :) maybe you could take a look at http://rafb.net/p/1TKczC13.html
f00li5hTeppich: the topic lists many wonderful paste bins
SWEET MOSIS, that's a hell of a regex
f3ewgnube, that won't work :P
f00li5hTeppich: http://rafb.net/p/1TKczC13.html
gnubef3ew, Works for me.
f00li5hTeppich: sorry, use vars is ick
actionCPAN upload: Tk-Wizard-2.002 by MTHURN
CPANupload: Tk-Wizard-2.002 by MTHURN
Teppichf00li5h: ...ick?
f00li5hTeppich: ick.
annoTeppich: you're redefining the entire hash on every access
f00li5hTeppich: you know the sound you make when you realise you've stepped in something disgusting
"ick"
f3ewgnube, you can copy the file, and it's contents, but not read them?
f00li5hTeppich: with variables, more scope == more bad
Teppichanno: interesting, but then, why do I get 20ish lines of output per found error/system...
annoyou probably want "$data{ $FQDNBlade} = $Def"
f00li5h%data=("$FQDNBlade" => "$Def"); shouldn't it be $data{FQDNBlade} = $Def?
annoTeppich: not from the code yopu posted
Flawlesscan I make an expression that matches the same subexpression (say) 30 times, without writing the subexp 30 times?
gnubef3ew, Not exactly. I perhaps did not explain myself properly. Since I am using Tie::File I have to be able to _write_ to the file, which I cannot do, so I copy it.
f3ewah
right
gnubef3ew, Sorry to be confusing or unclear
f3ew/foo{30}/
Teppichanno: ok thanks so far, try to fix it with your and f00li5h suggestions
f00li5hTeppich: also, if you use (?: ) to do non-capturing groups in your regex, you can have it so you only have 2 captures
gnubef00li5h, What is wrong with using files copied to /tmp?

Page: 3 10 17 24 31 38 45 52 59 66 73 80 87 94 101 108 115 122 

IrcArchive