@# Quotes DB     useful, funny, interesting





Google
 
Web www.quotesdb.info
Undernet  |  EFnet  |  Quakenet  |  Freenode  |  Dalnet  |  Ircnet  |  Galaxynet
Page: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32



Comments:

<0> hi perl ppl
<1> how would i do that?
<2> why would you want to make an undecypherable perl pattern matching?
<0> how should I initialize a hash's element to be an empty array?
<2> %hash = {};?
<2> that's just a guess.
<1> i think i need to do that to parse an item with Parse::RecDescent in my application
<3> boobaa: what?
<0> I mean a concrete element
<4> bluebeard: No, never do that. Ever.
<2> lol
<0> $foo{$bar} = <empty_array> - or alike.
<2> why not?
<5> boobaa: [] is a new anonymous array.
<0> thx
<4> bluebeard: Do you know what it does?



<3> eval: $^W=1; %hash = {};
<6> Reference found where even-sized list expected at (eval 138) line 1. hobbs: Return: 1
<5> ({} is a new anonymous hash, () is *not* new nor anonymous, but an empty list (which is a value, not a box))
<2> I know what it does in my head.
<7> it summons the devil
<8> I just saw on site that I can do "system('command $var');" and then $var will have the value of the output? that doesn't seem to be the case.. :/
<3> Yawgmoth7: you see a lot of stupid incorrect crap on the internet
<2> eval: $^W=1; %hash = (); #then?
<6> bluebeard: Return: 0
<3> Yawgmoth7: especially when it comes to Perl tutorials
<8> hoobs, xD
<3> Yawgmoth7: And I already told you what you need to look into ;)
<8> yeah
<2> I saw my self in a tutu on the internet.
<2> I'm pretty sure that never happened.
<2> damn photoshop
<8> backticks or qx or readpipes :D
<2> either that or damn alcohol.
<2> it's really 50/50
<7> i think i maturbated to that picture :O
<2> I'll take that as a complement.
<7> you're my cyber man-friend now
<2> no, that's okay
<1> how could I write a regex pattern that matches any string not containing '/', but is not the string 'P'?
<2> more people want to cyber me on freenode then on ***net.
<2> that's strange.
<2> hmm... firefox just shat it's pants
<4> hagabaka: Look at the ?! operator in perlre
<1> oh, thanks
<5> in vi how do you run an external command and insert its output at the current cursor position?
<2> !command
<2> I think
<5> that expects some other keypress after the ! :-/
<5> ah, !!ls (ie replace the current line with the output) works
<9> integral: you could also try r!
<10> integral: :r!cmd
<5> ah! thanks :)
<2> heh
<1> when i have $s = '(a)', will the parentheses be automatically escaped in /$s/?
<2> soo exploitable..
<11> whats a module I can use to parse out urls from text?
<5> URI::Find
<2> I remember a practice hack that involved someone's dialup bbs displaying the motd with less.
<2> you were supposedto figure out to use !cmd
<2> heh
<5> hagabaka: no, use \Q (aka quotemeta, see perldoc -f quotemeta, and "Quote-like operators" in perldoc perlop)
<6> quotemeta. To access this perldoc please type, at a command line, 'perldoc -f quotemeta'. You may also find it at http://perldoc.perl.org/functions/quotemeta.html
<2> nothing like getting a shell where you least expect it
<11> integral: anything that is probably core?
<5> imMute: no.
<12> hey guys, why does $foo = system('bar');print "value of foo is $foo" not give the actual value of foo?
<11> merl15: what do you expect $foo to be?
<12> the output of system('bar')
<5> merl15: perldoc -f system. perldoc -f qx
<6> system. To access this perldoc please type, at a command line, 'perldoc -f system'. You may also find it at http://perldoc.perl.org/functions/system.html
<5> merl15: try finding out what system's meant to do instead of just guessing
<2> haha, finally got all my dependancies in order.
<12> integral: sure, that's why I was asking :)
<5> merl15: why? perl comes with perldoc -f.
<5> it's definitive.
<12> ah, integral now you say :) I didn't know it's my first day bothering to learn some perl more in depth, thanks



<12> ah the return value is the exit status of wait..interesting
<8> heyo, one last question
<8> If I have something like
<8> $var = qx'somecommand';
<8> And then I do...
<8> print "blablabla $var";
<8> Is there any reason why it would make a newline?
<5> Yawgmoth7: qx captures the newline output by somecommand.
<5> see perldoc -f chomp
<6> chomp. To access this perldoc please type, at a command line, 'perldoc -f chomp'. You may also find it at http://perldoc.perl.org/functions/chomp.html
<8> Because I have something similar (Different variable name and stuff like that) but no \n's anyhere and it new lines
<8> arg
<8> right
<13> somecommand output contains newline
<8> I should have known that
<8> I did know that, blanked my mind
<8> Sorry to bother you fellas, thanks
<13> I haven't coded anything in perl for last 3 months
<5> bycircles
<13> integral, ?
<5> it's a mispelting
<14> I laugh at yu.
<14> NPR is odd. It goes from an interview with the director of United 93, to opera.
<15> I like how random it can be at times
<15> there are other networks that are even more random though
<7> is that a nice way of saying it's unorganized? :)
<1> is there a built-in way to get the list of keys in a hash?
<11> hagabaka: heys
<11> hagabaka: keys *
<11> hagabaka: perldoc -f keys
<6> keys. To access this perldoc please type, at a command line, 'perldoc -f keys'. You may also find it at http://perldoc.perl.org/functions/keys.html
<1> oh
<1> i only saw the example of "keys %hash = 1000;"
<14> Not unorganized. It was literally, "And now it's time for some music!" and you're subjected to a soprano aria from Madame Butterfly.
<2> wait
<16> Does caching have anything to do with clicking the back/forward buttons on your browser?
<2> eval: %hash = ( 'blah' => 'yarr', 'foo'=>'bar'); "keys %hash = 1000;"
<6> bluebeard: Return: keys %hash = 1000;
<2> eval: %hash = ( 'blah' => 'yarr', 'foo'=>'bar'); keys %hash = 1000;
<6> bluebeard: Return: 2
<1> you can reserve spots
<2> rutski89, browsers tend to cache pages in the sort term so you don't have to keep downloading them over and over.
<16> bluebeard: yes, but does clicking the back button constitute "getting the page again"
<2> pressing back/forward is the easiest way to see this.
<2> no
<2> you have to hit reload.
<16> ok, cool
<2> unless you specify don't cache in the header.
<16> I was just afraid that if i set Cache-control: no-cache on my dynamic pages that it would re-load every time you hit back or forward
<17> or you have your cache set to 0 kb/mb or whatever
<16> bluebeard: oh, so my worries were correct then?
<2> try it and see.
<16> I'll go set non-cache on my server and see what happens
<16> yea
<2> :P
<16> bleh, mod_headers isn't default in apache 1.3 :-/
<2> really?
<16> httpd -l isn't showing it, so I'm ***uming it's not
<2> do you need it to send headers?
<16> yup, and the ./configure --help in the apache source tree I built from shows that the default is "headers=no", which means that mod_headers is off by default
<16> bluebeard: yup, it lets you specific arbitrary headers, like "Cache-control"
<2> strange.
<16> well I'd bet that most people wouldn't bother using it, so it's reasonable that it's off by default
<2> but you can still print "Content-type: text/plain\n\n";?
<16> a little annoying since I have to recompile now, but reasonable
<16> oh, yea; good point
<16> but that's not a long term solution
<16> i'll try it for now, thanks for saving me some time :)
<2> heh
<2> no prob
<18> "ServerCrash" at 59.95.201.239 pasted "Simple Regex issue" (11 lines, 230B) at http://sial.org/pbot/17372
<19> ServerCrash: your perl ****s, give up
<11> urk3l++


Name:

Comments:

Please enter the result of the sum 63 + 46 (to avoid spam):






Return to #perl
or
Go to some related logs:

#linux
CraiZE
#ubuntu
mysql inline-if
ubuntu autoarrange
outputtree+java
#osdev
#perl
conky glib-2.0
#perl



Home  |  disclaimer  |  contact  |  submit quotes