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

Channels


#perl

02 October 2007


Total 34 pages. You are browsing page 3/34.

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

02:17 <****> which means there's no way for anyone to tell what it's supposed to be doing, because it doesn't come anywhere _near_ doing anything.
02:18 <****> strange, HTML::Element is looking treating th elements like td ones
02:19 <****> FreeBSD-- # allowing perl port names like p5-perl-ldap, wtf's wrong with you people?
02:20 <****> hobbs, I want to insert this if op to test whether $1 is empty, but get this runaway error.
02:20 <****> this is the actual line: $var =~ s/\Q$var[0]\E(\\_)*(?(1)\s*(.+?)(?=\n\n))/(?($1)"{\\parindent0pt ".$2."}":"")/se;
02:21 <****> anabain: you get that because the code DOESN'T EVEN RESEMBLE VALID PERL
02:21 <****> why?
02:21 <****> what is (?($1) with a string jammed up next to it supposed to mean?
02:21 <****> a conditional
02:21 <****> well it's not
02:21 <****> "BobSapp" at 87.194.41.128 pasted "on line 42 it should ignore the th elements whats going on?" (54 lines, 2K) at http://sial.org/pbot/27837
02:22 <****> if i saw that in real code, i'd kill a programmer
02:23 <****> hobbs, if there is a \\_, that is, $1 is not empty, the code inside (?($1) ) is "seen" by the regex.
02:23 <****> anabain: no
02:23 <****> anabain: the right side of s/// is not a regex.
02:24 <****> the cond is in the *left* side
02:24 <****> anabain: no it's not. Try reading your own code.
02:25 <****> anabain: You have it on both sides
02:25 <****> yes, you're right, sorry
02:26 <****> but then the problem is the right side, ok?
02:26 <****> anabain: The right side with your /e is just Perl code
02:26 <****> OMG. what the fuck is that? http://img371.imageshack.us/img371/4806/18hg1.jpg
02:26 <****> ofer: my angel.
02:27 <****> ofer: Your gf?
02:27 <****> ok, jagerman, and there I want to put a conditional
02:27 <****> anabain: So put one
02:27 <****> shinigami eyes.
02:27 <****> anabain: The right side with your /e is just Perl code
02:28 <****> ofer, marble floor?
02:28 <****> jagerman, can I put an if (){} construction, or need I to put an if op?
02:28 <****>look_up problem ?
02:29 <****> anabain: put if statements and while loops and ternary expressions and whatever else you want in there. You could have your perl code consist of "s{.?}{...}e;" and put your whole code inside the ... if you want.
02:29 <****> anabain: The last expression will be the one that gets used
02:30 <****> anabain: So, easiest would probably be a simple ternary operator
02:30 <****> s/.../$1 ? "foo" : "bar"/e;
02:30 <****> oh, I think I have detected the problem: (?($1)"{\\parindent0pt ".$2."}":"") is bad. I must swap ? and ($1), I think
02:31 <****> $1 ? "{\\parindent0pt $2}" : ""
02:31 <****> argh!
02:32 <****> "WARNING: This extended regular expression feature is considered highly experimental,"
02:33 <****> yes, I know that song, jagerman
02:33 <****> anabain: I really don't see why you are striving to use it
02:33 <****> You certainly don't need it
02:35 <****> s/\Q$var\E(?:(\\_)+\s*(.+?)(?=\n\n))?/.../se
02:35 <****> It's *simpler* without it.
02:38 <****> I just put a guard case in there
02:40 <****> what's the thing called where you get data from the URL like : "http://www.google.com/webhp?complete=1&hl=en" I would google it but I forgot what its called....
02:40 <****> Web browsing?
02:40 <****> web scraping ?
02:40 <****> what is the best way to make my perl script restart itself
02:41 <****> Are you looking for a module? LWP? WWW::Mechanize?
02:41 <****> I mean the part that says ?complete=1&hl=en
02:41 <****> perlbot, cgi env
02:41 <****> See jagerman's CGI environment script: http://jagerman.com/env.cgi
02:41 <****> LWP::Useragent?
02:42 <****> Ryan52, parameters ?
02:42 <****> url parsing?
02:42 <****> Ryan52: Add some ?blahblahblah=1 on that URL and find it in the list
02:43 <****> how do you get the data from that in a script?
02:43 <****> oh...I thought that was for forms...
02:43 <****> There's a form on that page, if you prefer.
02:43 <****> thanks
02:43 <****>param('complete') would return 1
02:44 * jagerman wonders if he could be any more vague
02:44 <****> I wonder...
02:44 <****> "What's the thing called on the web, you know, the thing that you use on the web?"
02:44 <****> yeah, not very clear..
02:44 <****> oh, you mean the internet?
02:44 <****> are you talking about that network thingie?
02:44 <****> or the other thingie?
02:44 <****> "I'd using that thing on the web to search for that thing on the web, but I don't remember what that thing on the web is."
02:45 <****> s/using/use/
02:45 <****> you have to have yahoo or google for that.
02:45 <****> Ryan52, http://search.cpan.org/dist/CGI.pm/CGI.pm#FETCHING_THE_VALUE_OR_VALUES_OF_A_SINGLE_NAMED_PARAMETER:
02:45 <****> what is the best way to make my perl script restart itself
02:46 <****> BayRoot: Yeah, I used those things on the web, and clicked the thing on the web page, and that showed me several things on the web, but not the thing I wanted.
02:46 <****> Mr-Shutter: Depends on the context.
02:46 <****> jagerman: hahaah
02:46 <****> exec "path_to_script" may be the best way, or it may not.
02:46 <****> i just want to script to run it self and die
02:46 <****> i think using exec and dieing doesn't work
02:47 <****> the exec dies too...
02:47 <****> no
02:47 <****> exec() replaces the currently running program with another
02:47 <****> Ryan52: those are get parameters arent they?
02:47 <****> die() doesn't come into it at all
02:47 <****> or variables
02:47 <****> "GET"
02:47 <****> anyway i have work in 7 hours lol
02:47 <****> Mr-Shutter: Why do you think it doesn't do what you wish? And what do you wish to happen?
02:48 <****> pravus, you mean that the process will become that program you calleD?
02:48 <****> Mr-Shutter: assuming exec() is successful, yes
02:48 <****> i want it to run it self as another pid and then die
02:48 <****> and the new pid continues
02:48 <****> so...like
02:48 * apeiron hands out perldocs. perldocs for all!
02:48 <****> Mr-Shutter, perldoc -f exec!
02:48 <****> Non-multipart "POST" looks just the same
02:48 <****> perhaps you want fork()?
02:48 <****> Or system.
02:49 <****> restart { exec(perl, $0); die "restarting...";}


Total 34 pages. You are browsing page 3/34.

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


Tutti i nuovi CAP Italiani. Come ottenere il database completo