| |
| |
| |
|
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> merlyn: no no... i don't think i'll agree with your generalization of the cause <0> what's wrong with mod_perl? i don't quite unstand <1> nothing's wrong with it. <2> merlyn: just for FYI purposes, mv is now Interchange <1> hobbs - thanks <1> OK phone call just came in... meeting $cute_girl for lunch. <1> see ya all <0> wait... you can't leave! <0> who's gonna hold the perl bastion? <3> heh <4> Alright... one more question, and that should do it for me, at least for today. <5> "JrHacker" at 12.37.33.3 pasted "This is it... but it doesn't work." (10 lines, 141B) at http://sial.org/pbot/16574 <4> Any help would be much appreciated. <6> JrHacker: bottom line: you can't do that like that. <4> Well, erm... <4> How should I go about it?
<7> dngor: nothing I do fixes home/end/backspace <6> JrHacker: you can open a read from one file, then write to another, then move the written file back to the original place... or you could check out some Tie:: modules... <4> How would I do it by the first method you mentioned? <6> open my $load, "<", $filename; open my $save, ">", $otherfilename; while (<$load>) { ..etc..; print $save $_; } rename $otherfilename, $filename; <6> or something like that <6> with error checking and all <4> Hmm... <4> Will it overwrite the original? <6> yes. <4> Good. :) <6> remove the unlink() to make it not do that. <4> Hmm... <6> where $filename ne $otherfilename, of course <6> and ! -e $otherfilename just incase <4> ! -e ? <6> perldoc -f -X <8> The perldoc for -X - is at http://perldoc.perl.org/functions/-X.html <6> ! -e is "not file exists" or "file doesn't exist" <4> That doesn't make sense to me. :P <6> it doesn't exist beforehand. <4> Oh, ok <9> GumbyBRAIN: MidnighToker <10> simcop2387: Cowles, hoods and habits with thir fame in heav'n. <4> So... let's see... <2> GumbyBRAIN: I need more cowbell <10> hobbs: I think my regexp is borked somewhere but i need more cowbell. <4> encryptio: Like this? http://sial.org/pbot/16575 <9> GumbyBRAIN: hobbs BinGOs and integral walk into a bar <10> simcop2387: Close at mine ear one call'd me sin, and for a walk. <11> GumbyBRAIN, Some people call me the space cowboy, some call me the ganster of love. Some people call me MAURICE (wa wa waaaa) because I speak, of the pompatus of love <10> Shadda: Kd,a poor man once told me that i certainly can't afford to speak. <11> heh <11> nice counter lyric <11> They Might Be Giants++ <6> JrHacker: close.. you need to quote "C:/Perl/tmp.txt" on the last line. but yes. <4> That'll do it? <6> should. <4> :) <4> I'll try it. :) <12> encryptio: he's missing "use strict" <2> Shadda: People talkin' about me, baby, say I'm doin' you wrong. But don't you worry baby, don't worry, 'cause I'm right here right here right here at home <2> dammit <2> GuMbYbRaIn: People talkin' about me, baby, say I'm doin' you wrong. But don't you worry baby, don't worry, 'cause I'm right here right here right here at home <10> hobbs: You don't say. <6> sili_: mmm.. missed that one <11> Cause I'm a picker, I'm a grinner, I'm a lover, and I'm a sinner <2> I do say dammit <4> encryptio: "String found where operator expected at filter.pl line 5, near "$load "<"" <6> , <2> GumbyBRAIN: I play my music in the sun <4> Ah, right <4> encryptio: Is my use of @ARGV correct? It seems to not like it. <6> well.. for one, you're not using @ARGV, you're using @argv... <4> Oh, erm... right... <2> I'm waiting for *ARGH to be introduced <11> GumbyBRAIN, There's just two songs in me, and I just wrote the thrid. Don't know where I got the inspiration or how I wrote the worlds. Spent my whole life just digging up my music shallow grave, for the two songs in me and the third one I just made <10> Shadda: And that one up. <4> Now it doesn't give any error, but tmp.txt isn't removed, and the substitute doesn't seem to be working either. <6> ARGH#!
<13> also missing quotes <6> JrHacker: add a few "or die $!"s, after the opens and after the rename... <6> the regex problem i can't help with because i don't know the data <4> Heh. I'm trying to remove ANSI escape sequences. <4> They look like [0;32m ... with different numbers. <6> s/\033\[.+?m//g <6> actually <6> s/\033\[.+?[a-z]//g <6> alternatively... <6> | col -b | <14> \e <4> s/\[\d\;\d\dm// should work, shouldn't it? <6> it doesn't remove the escape sequence. <15> is there some reason this: if ($line !~ m#^\(\w+\:.*\:\)$# || $line !~ m#^Changes \w{3}.*\:$# { print $line."\n";} keeps printing "(Format: Year/Month/Day)" and "Changes for 0.9.16:" <6> the whole escape sequence, that is. <4> It doesn't? <6> \033 is there, just not visible. <4> Oh. <4> So... s/\033\[\d\;\d\dm// should work? <6> needs a /g <16> Hi! <7> Hi! <16> Can I remove modules with cpan ? <4> encryptio: Why? <17> JrHacker: s/\e\[(\d+(?:;\d+)*)?.//g <6> JrHacker: otherwise you won't get but one replacement per line, maximum <4> encryptio: Ah... thank you. :) <13> Axioplase: perl -nle 'unlink $_' .packlist :) <4> mauke: Is that better than s/\033\[\d\;\d\dm//g ? <6> JrHacker: although mauke's looks like it'd work best <16> Khisanth: a bit rude :) <17> JrHacker: it's a lot more flexible <13> otherwise no, although cpanplus does have an uninstall option <4> mauke: Awesome.. thank you :) <17> oh, and I forgot a ?: <4> Where? <6> before the first \d <17> after the first ( :-) <6> s/\e\[(?:\d+(?:;\d+)*)?.//g <6> but it's not a showstopper. <17> <insert ***ist remark> <4> Heh. <4> At least I'm trying... <13> errr: well neither of those match m#^\(\w+\:.*\:\)$# <13> errr: and || short circuits <6> JrHacker: how long have you been doing it? (programming, not ***0ry) <5> "errr" at 216.82.206.108 pasted "regex trouble" (15 lines, 264B) at http://sial.org/pbot/16576 <15> Khisanth: oh.. would you mind helping me get the right regex to match? <4> encryptio: Seriously trying to learn perl? About... 2/2.5 months. <4> Actually... probably not that long. <13> hrm <4> encryptio: After adding some "or die($!)"'s... it returns "Permission denied at filter.pl line 11, <$load> line 44." <4> That's the rename line <6> maybe it's just windows being a bitch. <13> errr: m{\(Format: \d{2}/\d{2}/\d{2}\)} <13> oops m{^\(Format: \d{2}/\d{2}/\d{2}\)} <18> help <4> Hmm... perhaps it wants me to remove the old file first? <18> nvm <15> Khisanth: \d matches a 0..9 and that isnt in the Format: <15> Khisanth: thats a literal (Format: Year/Month/Day) <6> JrHacker: maybe. unlink($filename) <15> should I just look for that string literally? <13> I wasn't expecting people to put in such unless information :) <13> errr: of course <15> heh duh then thanks <4> Right, I know how. No dice.. still doesn't like line 11. <19> greetings anyone know of a command-line perl string to remove all space's from a file? <4> (Which is actually a different line now...) <19> something like: cah file.txt | perl -e 's/" "/""/g' > fileclean.txt <6> JrHacker: i don't know windows... <4> Heh.
Return to
#perl or Go to some related
logs:
#math #php +ubantu +video driver #math debian cups start stop sfv checker ubuntu horde smtp authenticate rtorrent gentoo init script debian etch kernel raid=part ruud bulix
|
|