@# 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 33 34 35 36 37 38



Comments:

<0> qr// returns a reference, so you had a reference-reference
<1> i've never seen "REF" before
<0> makes sense though
<0> it's all caps because it's a builtin type (i.e. reference)
<1> but it's a ref to a scalar (which happens to be another ref)
<1> eval: ref \[]
<2> encryptio: Return: REF
<1> o.O
<3> perl -le '$a=bless[],"foo";print"$a"' prints foo=ARRAY(0x810bd04) note the = sign, that's the key :)
<1> ah, but some objects override their stringification...
<3> bless [], 'HASH' # blessed or not? hehehehehe
<1> eval: ref bless [], 'HASH'
<2> encryptio: Return: HASH
<3> but of course, it's not a HASH *mad cackles*
<0> Scalar::Util::blessed is the real answer



<0> plus Scalar::Util::reftype for the other answer
<1> hobbs ftw
<4> $message =~ s/<\/?(HTML|BODY|FONT)>//ig;
<4> anyone see whats wrong with my regex to replace those HTML tags with nothing?
<4> <BODY BGCOLOR="#ffffff"><FONT FACE="Tahoma" LANG="0" SIZE=2>
<4> is getting by
<5> s#<\s*/?(html|body|font)[^>]*>##ig
<4> oh i forgot .*? after the tag name
<4> i bet thats why
<5> Insert boilerplate about not parsing html with re <!-- here -->.
<6> and use s{}{} when adding / to the actual regexp
<4> i'm not sure what either of you mean
<5> Don't use one delimiter if you're just escaping it inside the pattern. Use a different delimiter.
<0> bnovc: don't parse HTML with a regex. And if you're going to do it, don't use / as the delimiter if your pattern contains slashes
<4> oh ok
<5> like # or pairs of brackets/braces
<4> hobbs, i need to, i can't just strip tags
<4> b0at, yea, i usually use ~
<0> bnovc: no you don't
<4> hobbs, how would i do it?
<0> bnovc: you can, you know, actually parse it the right way
<4> how?
<4> the message can contain valid < and > that are not part of HTML tags
<5> With something that knows the langauge
<5> lan gague
<4> well its not just HTML is the problem, the message could just be '5 is < 10"
<4> and if i use the strip module, it takes out < 10
<0> bnovc: that's fundamentally broken then
<0> bnovc: and there's no very good way to handle it
<4> its not my choice that AIM clients add bull**** HTML
<4> and dont properly html entity
<0> bnovc: they don't. they send &lt; for a <
<4> IRC doesnt though and its used by both
<5> Ah HAH
<0> <font size="4">&lt;&gt;</font> -- the message I just sent myself
<4> i just html decode the AIM messages after stripping those tags
<0> bnovc: well check the protocol flag to see whether you should do HTML or not
<4> i suppose i can run the html strip if its only coming from aim
<4> it broke before when i tried on something though
<4> if i sent a message with < it crashed my entire perl script
<4> it wouldnt output anymore for some reason
<0> I blame it on incompetence
<4> yea probably, i'm not perl competent
<4> this is the first thing i've ever written in perl
<4> eval: my $string = '"ab\'c" ef\'g'; $string; &shellwords($string);
<2> bnovc: Error: Undefined subroutine &main::shellwords called at (eval 125) line 1.
<7> what are you trying to write?
<4> an AIM and IRC bot (in one script)
<4> its working just fine now
<8> Bot::BasicBot::Pluggable would be a lot nicer if not for the giant dependency chain due for some of the plugins it comes with
<4> i'm using POE with OSCAR and IRC
<4> working great, i have lots of features on it
<7> pretty involved for a first time perl script
<4> yep
<4> it does screenshots of websites, validates url, has custom triggers that can be plain text or perl or php, executes php, executes perl, google searches
<9> Sounds cool.
<10> buu: except the php bit
<4> heh
<10> </zealotary>
<4> i'm writing an msdn scraper so i can add references to it
<4> i have that mostly done but need to clean it up



<4> oh and it uses xrl.us to shorten urls
<4> i think thats all for now
<4> screenshots are a huge pain in the ***
<4> im doing it, possibly, the worst way ever
<4> but id ont know how to do it better
<11> when generating a graph using GD::Graph::bars, setting borderclrs to [qw(black)] doesn't appear to work (I don't see borders on the bars). Anyone know if there is another setting that is required for the border colors to be used?
<10> deblin: i don't know
<12> hmm, what is SWIG?
<13> <3 StarTrek TNG
<4> bnovc this is test'ing
<4> if i use shellwords on that it doesnt give me any return
<4> is that a bug?
<0> bnovc: no
<4> could you explain why it does that
<4> i would expect it to return 0=bnovc,1=this,2=is,3=test'ing
<0> bnovc: because it's unparseable as a shellstring
<4> how would you suggest i fix that?
<0> bnovc: by not using shellwords on something that obviously isn't. Or by fixing your input.
<4> just not use shellwords?
<4> wel its arbitrary user input
<4> i guess i'll use regex to get the parameters instead?
<0> bnovc: why are you obsessed with regexes?
<4> hobbs, because i know regex better than i know perl
<4> and i dont know how else to do it
<4> do you have a suggestion
<0> bnovc: no, because you don't seem to have a defined input format :)
<4> i dont, its user input
<4> that i'm parsing to put into functions
<8> doesn't matter, GIGO still applies
<0> bnovc: you can't PARSE something without being able to describe it as a language first
<0> bnovc: the parser for "any random input" is the one that matches all input and returns it as a single string
<14> GumbyBRAIN: I'll be back, Bennett.
<15> This is just not one of those policies are just crazy enough to be the way back to back, though.
<4> hobbs, ok that wont work in this case though
<0> bnovc: no really?
<4> no need to be rude about, i'm trying to learn what to do best
<4> i was thinking about counting the number of ' and " not proceeded by a \ and if its odd output an error
<13> eval: ${$hashref->{hash}}{'monkey'} = "bar";
<2> devonst17: Return: bar
<0> bnovc: ...
<13> w00t
<0> bnovc: that's what shellwords is already doing. Except that it's returning undef
<4> i suppose so
<4> perhaps replacing all " and ' after the 2nd " with a \ in front
<0> stop supposing, guessing, and ***uming
<4> you're not providing any solutions
<8> and you aren't defining what is valid input
<0> bnovc: you're kidding, right?
<4> i would like it to just give me the first 'parameter' and disregard the rest, actually
<4> that would be ideal
<0> and you still haven't DEFINED YOUR INPUT FORMAT IN ANY WAY
<16> how does one output quotes ?
<4> hobbs, how could i define my input...the user types it into the script
<0> so how does anyone know what a "parameter" is?
<10> sfullenwider: q{"}
<4> a parameter is anything between the first set of "" and if there is none, the first characters before a space
<1> print "'"; print '"'; print "quote: \" - cool, huh?"; print 'don\'t forget';
<0> bnovc: do you remember that conversation we had 5 minutes ago? Try READING IT
<0> bnovc: because you obviously paid no attention
<10> sfullenwider: or any other type of quotes other that the ones you want to use '"' or "'"
<4> i've paid full attention and you're being really rude
<10> bnovc: don't fight it. you'll just piss him off more.
<16> tnx f00li5h
<10> sfullenwider: any time.
<0> bnovc: you. have. to. define. a. format. you. have. to. accept. some. input. and. reject. some. input. otherwise. you. can't. parse. anything.
<0> bnovc: if. you. accept. all. input. then. you. have. no. parser.
<17> Hi, I am using the Gtk2 module for perl, and I am trying to use a TreeView for listing some data. However, I can't for the life of me figure out how it works. Forgive me as I know very little about gtk+. I am creating the TreeView, and then using set_model to give it a ListStore model. Now, I cannot figure out what type this ListStore should use. I've tried a bunch of types such as Labels etc., but nothing ever shows up.
<0> bnovc: does it make sense the fourth time?
<8> Marmar: types like Glib::String
<17> ohhh ok
<17> thanks
<8> you must also add columns to the TreeView
<17> ok


Name:

Comments:

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






Return to #perl
or
Go to some related logs:

#css
#perl
don't you have an outstanding dui
kde-meta skip packages
cdemu ubuntu install
#math
python class inside a class
#python
nanobot compressing
vodafone merlin u630 ubuntu



Home  |  disclaimer  |  contact  |  submit quotes