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

Channels


#perl

17 October 2007


Total 46 pages. You are browsing page 1/46.

First :: Prev :: [1] [2] [3] [4] [5] [...] :: Next :: Last

--- Log opened Wed Oct 17 00:00:24 2007
00:03 <****> hi
00:04 <****> is Data::Dumper a standard perl thing? If so, where does it dump by default?
00:04 <****> dpy, it is
00:04 <****> yes, perldoc Data::Dumper
00:05 <****> corelist Data::Dumper
00:05 <****> where does the data go? some tool is using it for logging I thik
00:05 <****> think
00:05 <****> wherever you tell it to go
00:05 <****> read the documentation, it should become pretty clear where it goes
00:05 <****> dpy: read the docs as Somni suggests
00:06 <****> 2}, 3])'
00:10 <****> hi
00:10 <****> can i get basic perl usage help here?
00:10 <****> yes. some of the help may be pointers to docs, though
00:11 <****> cool
00:11 <****> if i do if(open(stuff)) and it succeeds, it will evaluate to truth in the if() yes?
00:11 <****> and to false in case it doesn't succeed?
00:11 <****> what does perldoc -f open say?
00:11 <****> i don't have perldoc here :\
00:12 <****> how can you write perl without perldoc?
00:12 <****> i checked the perldoc webpage but it's not revealing
00:12 <****> http://perldoc.perl.org/functions/open.html
00:12 <****>", "stuff.data" or die "blabla" is the good way to do it
00:12 <****> cheater: Open returns nonzero upon success, the undefined value otherwise. If the open involved a pipe, the return value happens to be the pid of the subprocess.
00:12 <****> yes, it does
00:12 <****> it just says it evaluates to nonzero on success but
00:13 <****> i don't know if that turns out to true in the if()
00:13 <****> so?
00:13 <****> yes, every nonzero numbers is true
00:13 <****> oh ok
00:13 <****> cheater: Why do you not have access to perldoc?
00:13 <****> where is the bot :(
00:13 <****> buu because i'm trying to code a plugin for xchat on windows and that doesn't come with a full perl package i guess
00:14 <****> well.. I'm clueless... I think everything goes to stderr via warn()
00:14 <****> how can you code a plugin without knowing perl?
00:14 <****> perlbot, false
00:14 <****> undef, 0, "", "0"
00:14 <****> cheater: then it's time to install an independent version of Perl, for testing and learning purposes
00:15 <****> i will as soon as i can find time for that. i only have like half an hour to dedicate to this today.
00:15 <****> word around the campfire is that perlbot is actually written in vbscript
00:15 <****> haha
00:15 <****> cheater: then you don't have enough time
00:15 <****> "xpato" at 200.73.34.13 pasted "regex for url" (3 lines, 78B) at http://sial.org/pbot/28067
00:16 <****> is it possible (im sure it is, but what the dangers then) to fork a sub and in the sub fork different processes?
00:16 <****> nollan: of course
00:16 <****> somni i'm already done. adding more features right now ;)
00:16 <****> i have this http://sial.org/pbot/28067 to get the domain and uri part of an url
00:16 <****> nollan: you can't actually fork a sub, but you can call a sub in the child process
00:16 <****> xpato, horrible
00:16 <****> xpato: install URI, don't parse URIs yourself
00:16 <****> mauke, ok
00:17 <****> $url =~ m|(\w+):\/\/([^/:]+)(:\d+)?/(.*)+|; shoundlnt be?
00:17 <****> zoo: fails mailto:foo@bar
00:17 <****> cheater: you are attempting to learn Perl basics via IRC, with no reasonable Perl install; it's going to take more than half an hour for this
00:17 <****> yep
00:17 <****> name one thing that you program that needs forks
00:17 <****> lol
00:17 <****> spoons
00:17 <****> the problem is that i get no defined $uri is the url is something like: http://www.google.com
00:17 <****> xpato: use URI;
00:18 <****> checking
00:18 <****> with no perl installed?
00:18 <****> wth?
00:18 <****> that should be a capital crime ffs
00:18 <****> when would i program something with threads?
00:18 <****> When you had no other choice
00:18 <****> initself: in Perl, preferably never
00:18 <****> Is that when you think about using C?
00:18 <****> I've never yet in perl managed to get into that situation
00:18 <****> is there a way to have perl output "warn" stuff to a file instead of stderr? stderr output is lost here
00:19 <****> xpato, you should look regex::common
00:19 <****> dpy: Reopen stderr.
00:20 <****> initself: depends on the problem, if it truly does require threads (I've yet to actually work on a problem that does), Python or C++ probably
00:20 <****> Wil this do what I think it does?
00:20 <****> ~
00:20 <****> return ('', '');
00:20 <****> initself: who knows; what do you think it does?
00:20 <****> initself: threads? haskell or erlang.
00:20 <****> Returns two blanks.
00:20 <****> Java!
00:21 <****> initself: try it and see
00:21 <****> in list context, yes
00:21 <****> what about into this context?
00:21 <****> my ($model, $year)
00:21 <****> that is a list
00:21 <****> Khisanth: that word is naughty
00:21 <****> that's not a context
00:21 <****> taboo even
00:21 <****> mauke: no?
00:21 * idiotben hates java
00:21 <****> my ($model, $year) = my_sub();
00:21 <****> initself: where does return ('', '') appear there?
00:21 <****> idiotben: it's only slightly painful
00:21 <****> ot
00:22 <****> ok, in that case = looks at its LHS, sees parens, and gives my_sub list context
00:22 <****> mauke: it's the return value from my sub.
00:22 <****> Great.
00:22 <****> so yeah, that will do exactly what you think
00:22 <****> buu: is reopen a perl function ? I'm trying to search perldoc.perl.org, reopen yields no results


Total 46 pages. You are browsing page 1/46.

First :: Prev :: [1] [2] [3] [4] [5] [...] :: Next :: Last


Tutti i nuovi CAP Italiani. Come ottenere il database completo