Home Page   #javascript  #perl  #c  #openmoko  #php  #ruby-lang  #apache  #cisco  #java  #mysql   Wallpapers Girl
Reliable $1 Web Hosting by 3iX

Channels


#perl

07 November 2007


Total 25 pages. You are browsing page 25/25.

First :: Prev :: [...] [21] [22] [23] [24] [25] :: Next :: Last

23:28 <****> hi everyone i am a mosque
23:29 <****> milkcan: don't be silly. mosques can't type
23:29 <****> perltidy rulz! thanks a lot mauke ;)
23:29 <****> but
23:29 <****> isnt mosque french for mosquito?
23:29 <****> no
23:29 <****> oh.
23:29 <****> i am a mosque the building
23:30 <****> Its probably some newfangled internet meme like AYBABTU.
23:30 <****> sorry im too old to get it.
23:30 <****> all yuor AYBABTU are belong to us
23:30 <****> GumbyBRAIN: dazzle us with brilliance
23:30 <****> It doesn't exist of nearly the same format strings is because it would be easier for us with brilliance.
23:30 <****> ^^ the gnu-style mashup ;)
23:30 <****> heh
23:38 <****> Hi guys. I was looking for a method to source all perl scripts from a directory, but i seem to be having troubles
23:38 <****> I would like to match '11.22.33.44 foo' with /^((\d+)\.(\d+)\.(\d+)\.(\d+))/ - it wont work. If I remove ^ it works, but I would like to match this number only when it's on beggining on line.
23:38 <****> i was trying to do something like: use "directory"
23:38 <****> but that doesn't appear to be the way to do it
23:39 * apeiron takes up residence inside milkcan.
23:39 <****> superm1: are you really just trying to load plugins?
23:39 <****> StoneToad, well they are other scripts that i hvae that i would like to conditionally load
23:39 <****> so kinda like that i guess
23:40 <****> eval: [ '11.22.33.44 foo' =~ /^((\d+)\.(\d+)\.(\d+)\.(\d+))/ ]
23:40 <****> mauke: ['11.22.33.44','11','22','33','44']
23:40 <****> there are quite a number of modules on cpan that deal with plugins for you
23:40 <****> joey[]: matches
23:40 <****> StoneToad, so these child scripts will need to be defined as perl "plugins" then to do it that way i would take it
23:40 <****> or is plugin == normal script
23:40 <****> leme get the link for the one I'm thinking of
23:41 <****> http://search.cpan.org/~simonw/Module-Pluggable-3.6/lib/Module/Pluggable.pm
23:41 * CPAN upload: Text-ASCIIMathML-0.6 by NODINE
23:41 <****> StoneToad's url is at http://xrl.us/9dy8
23:42 <****> mauke: can it be a problem is $barr (containing number and foo) has multiple lines and this match is on second line inside it?
23:42 <****> basicly it's setup so you can easly load perlmodules defined under YourModule::Plugin::Name
23:42 <****> joey[]: so it's not at the beginning of the string?
23:42 <****> caveat that I havn't used it myself
23:42 <****> mauke: no, but it's on beggining of line
23:42 <****> hmm
23:43 <****> sounds like you want the /m modifier
23:43 <****> StoneToad, yeah that looks like it would be the way to go
23:43 <****> thanks a bunch, i'll give this a spin
23:43 <****> cool, working! thanks mauke
23:43 <****> how to initialize an array reference? my $aoa= 0; or
23:44 <****> CHMEarl: my $aoa = [ ];
23:44 <****> CHMEarl: do you really need to initialize it at all?
23:44 <****> my @AOA = (); $aoa = \@AOA
23:44 <****> or just start using it
23:45 <****> pravus, thanks again
23:45 <****> eval: my $aoa; push @$aoa, qw/ a b c /; $aoa
23:45 <****> pravus: ['a','b','c']
23:46 <****> Is there a variable which contains the PID of the last process executed with system() ?
23:46 <****>; # don't blame me if you lose a foot :P
23:46 <****> go|dfish: that doesn't make sense
23:47 <****> go|dfish: system only returns when the process is gone
23:47 <****> Ah.
23:47 <****> Maybe the PID of the last child process?
23:47 <****> Khisanth, hehe.
23:47 <****> well pluggable seems like a cleaner way to do it, but yeah i was considering something like that as a fallback
23:48 <****> Well, what I'm trying to do is launch a process let it run for a small time, and kill it.
23:49 <****> fork
23:51 <****>{key}. How do I determine the length of that array?
23:51 <****> mauke: I'll go read about that, thanks alot.
23:51 <****> Toger: actually, you have a reference to an array
23:51 <****> Toger: do you know how to determine the length of an array @a ?
23:52 <****> bpalmer usually 'scalar @array' or $#@array
23:52 <****> $#@array is wrong
23:52 <****> and hopefully a syntax error
23:52 <****> oops, well scalar is what I normally use
23:52 <****> Toger: do the same thing, roughly, then; you need to dereference that array reference to get the array, and evaluate it in scalar context.
23:52 <****>{key}}), e.g.
23:53 <****>{key}' it says ARRAY(...), not ARRAYREF(...)
23:53 <****> it's not the "scalar", it's the array in scalar context
23:53 <****> Toger: ... so?
23:53 <****> Toger: when you print "hi", it says hi, not SCALAR
23:55 <****> When I attempt to dereference it it says 'not an array reference'
23:55 <****> can one pipe result from one command to the next in perl as one can in bash?
23:56 <****> ok, nevermind, I was expecting arrrayref but not ARRAY.
23:56 <****> thanks anyway.
23:57 <****> happy_guy2: foo(bar())
23:57 <****> or what do you mean?
23:57 <****> happy_guy2: it's sort of backwards. :) you put the command in place of arguments of other commands
23:57 <****> clearly, we need a piping source filter.
23:57 <****>
23:58 <****> (is it haskell that lets you specify the pipeline in left-to-right order?)
23:58 <****> grep
23:58 <****> bpalmer: well, it lets you define your own operators
23:59 <****> yep
--- Log closed Thu Nov 08 00:00:07 2007


Total 25 pages. You are browsing page 25/25.

First :: Prev :: [...] [21] [22] [23] [24] [25] :: Next :: Last


Tutti i nuovi CAP Italiani. Come ottenere il database completo