@# 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



Comments:

<0> that'll use the same [] ref for each value in %words.
<1> PerlJam: i think it was getting the index, not the values. maybe.
<0> you could use map, though: @words{@list} = map [], @list;
<2> torbjorn: you need map.
<3> oh true
<4> japhy: well, no one specified otherwise did they? :)
<0> PerlJam: I don't even know what's going on.
<5> Torborn : is \(^/(\w+[-]?\w+)+) a little bit more right?
<5> Torbjorn : is \(^/(\w+[-]?\w+)+) a little bit more right?
<0> bruc: why are you \'ing the (, bruc?
<4> today is the day I figure out why serial I/O isn't working quite right on the gumstix computer.
<0> bruc: is this your "matching a directory path" regex?
<4> japhy: clearly he wants to match an open paren before the start of the string! :)
<3> bruc: you need to read up on regex in general
<3> PerlJam: clearly :)
<2> torbjorn: what's up?



<6> Waaah, Template::Extract does complicated recursive inheritance-fu!
<5> japhy : I would like to but I am sure it's wrong
<0> bruc: you might not see it, but it requires each folder in the path to have at least two word characters in it
<7> Bruc: umm, \( \( ..... ) ) is still mismatched-like?
<7> a \( does not match a )
<3> rindolf: not much. friday-beer in 30 minutes.
<0> bruc: and why are you using a regex for this?
<7> a ( is meaningful in a regular expression and matches a ) -- a \( is just a character to match against.
<8> hmm wats the value to change say a while loop to exit on say a 0 is it $/ ?
<5> Fennec, Japhy : generally speaking, a path to a file under Linux/Unix is like : /path/to/file/
<7> yes
<4> TipTap: your question doesn't quite make enough sense for me.
<7> why do you need to match a parentheses in your expression, then? :) you don't. You are confused, I presume...
<5> Fennec, Japhy : But How I can create a right regexp matching it?
<8> PerlJam, i want to do say while(<>) but when a 0 is past i want that to be the end of the read
<7> bruc: Sure you can't use something in File::? =/
<4> bruc: so ... are you ignoring the File::Basename advice, or you just want to know how to do it with a RE?
<2> torbjorn: I see.
<9> bruc: study? trial an error? learning? research?
<7> bruc: Do you deal with relative paths? with files that have spaces and odd characters in their name?
<7> what are you trying to extract from the regexp? validity? part of the path? the file name?
<5> PerlJam, Fennec : it is for learning regexp. I am going to use File::Basename as well.
<7> UNIX filenames are a poor candidate for this, I think. =/
<9> I would say reading but it does not follow that anything is learned.
<5> Fennec : the validity
<4> TipTap: while ($_=<> && $_ != 0) { ... } # maybe.
<8> but i don't want to have a if(/^0/) { break; } i want to just to natural break from the loop when it sees 0 is it the input record sepearator?
<7> What exactly IS invalid in a UNIX filename?
<9> bruc: Can you learn what is valid by asking in irc or by research and testing?
<10> Fennec: uhm.. / ?
<11> Fennec: all but / and null
<11> are valid
<7> and / is valid in a directory as well, sooo....
<5> kspath : I don't understand what you are meaning
<7> the only thing to check in your regexp is whether it has a null.
<9> bruc: Should I use other words or other languages?
<4> TipTap: oh, you want the number 0 to be your input record separator? Yeah, set $/ = "0", and while (<>) {...} loops will read a line at a time where the lines all end in 0
<5> kspath : Yes, you can.
<7> bruc: you're allowed files with names like "blah blah blah" and "my $imagedir = SystemImager::Server->get_image_path( $rsync_stub_dir, $image );
<7> eek
<0> bruc: you should not restrict the kinds of characters that can be in a directory path.
<7> mispaste, disregard that
<5> kspath : Before asking in irc, I read the official doc especially about regexp
<4> bruc: I believe he's saying something like "go try it yourself at your command line with your perl and don't waste time asking here"
<0> to match a FULL directory path (an absolute one) use something like: m{^((?:/(?:[^\\/]*|\\.)*)+)$}s
<5> PerlJam : I eventually understood. I am sorry to be still a beginner and to ask silly questions
<0> that will match a string if it looks like an absolute directory path.
<9> PerlJam: That is part of it. There is also the element of perhaps the people here will not really read it and either say it is right or wrong.
<5> Japhy : Thanks Japhy
<0> (which really just means: it starts with a /)
<7> A regular expression for a valid UNIX filename is /[^\0]+/ if I remember my syntax correctly, which I give about even odds to... :P
<0> because everything after that is meaningless anyway!
<4> Fennec: Are you sure NULs can't appear in filenames ? :)
<0> if you want the PARTS of a directory path, do something like:
<7> PerlJam: Not entirely.
<12> I have a perl script being called from a setuid program like : perl -I/some/directory myscript I'm getting "No -I allowed while running setuid.". How can I modify @INC to include the library path?
<0> my @tree = $path =~ m{/(?:[^\\/]*|\\.)*}sg;
<0> but that only works on filesystems that use / as the directory delimiter.
<4> japhy: er, yikes.
<5> japhy : that is what I wanted



<4> bruc: I doubt that. Really I do.
<4> It may be what you *thought* you wanted.
<4> but you're wrong.
<7> that may be what you THINK you wanted
<4> :-)
<0> you don't want to do it with a regex. it's probably wrong. I haven't tested it.
<7> hey- it may be what you want, but it's not what you SHOULD want
<1> d'oh! my whole problem was actually an incorrect use of 'push'. i was stupidly doing: @list = push @list, $word. turns out it should just be: push @list, $word.
<5> Fennec : perhaps
<5> japhy : I will look for File::Basename
<5> But what of my aims is to learn writing good regexps
<4> bruc: That's a worthy goal. But you should also learn *when to use them*.
<4> And just as important, when *not* to use them.
<5> PerlJam : When do I have to use them? Do I have to look for a module doing what I want before using regexp for instance?
<4> bruc:you should *always* look for a module first (for anything you can think to do) if you're interested in getting work done.
<13> japhy: why does use CGI qw( param header ); works even if CGI is not listed in active modules ?
<4> bruc: If you just want to learn, then it doesn't matter if there's a module or not, because you're learning
<5> PerlJam : all right. This is what we have to do for any kind of program?
<4> bruc: The best perl programmers use as many already-invented wheels as they can.
<5> PerlJam : thank you very much for your help. Do you have any further advice to give me?
<9> bruc: learn test learn test learn test...
<4> bruc: I got tons of it, but the best advice I can give is 1) read the docs and 2) experiement
<5> kspath : ok. That's what I do when it comes to learning Perl
<9> bruc: will do?
<9> bruc: You can take notes on paper or in a file using your favorite editor (vim) cough
<5> kspath : This is what I am doing each time I am writing a perl script
<5> kspath : I use vim as text editor
<4> great. I've only got one-way communication through this serial port and no idea why.
<9> PerlJam: broken or bent pins?
<4> no, flow control issues apparently.
<13> I've used this perl script http://mamchenkov.net/wordpress/2005/04/26/nucleus2wordpress/ to migrate from nucleus cms to wordpress, now accented letters are all messed up
<14> suppaman's url is at http://xrl.us/m8bi
<15> bruc++ #vim
<13> how can I deal with encondings ?
<5> q[ender] : What do you mean by bruc++ #vim ?
<16> What kind of idiot karmas himself? Your kind of idiot!
<15> bruc, heh
<2> q[ender]++ # vim
<4> suppaman: perldoc Encode
<17> Encode. To access this perldoc please type, at a command line, 'perldoc Encode'. You may also find it at http://perldoc.perl.org/Encode.html
<15> perlbot, karma bruc
<16> bruc doesn't have any karma
<15> sheesh, perlbot is broken
<2> bruc++
<15> perlbot, karma bruc
<16> Karma for bruc: 1
<2> perlbot: karma bruc
<16> Karma for bruc: 1
<5> I am new here : What is karma?
<15> PerlJam, what are you using a serial port for?
<15> bruc, it's just silly is what it is
<9> bruc: New to earth or IRC?
<4> q[ender]: I will be using it to collect data from a pressure sensor or current meter or other such device.
<4> and another for the radio connection
<9> bruc: karma is an idea/concept. search engine research.
<15> that sounds fun
<18> the mre karma you have the more girls will love you
<5> kspath : I am new to IRC. Does it cause you any trouble?
<4> q[ender]: Have you seen gumstix computers?
<13> PerlJam: pls have a look at row 140 in http://pastebin.com/770100
<15> no, what's that?
<17> The paste 770100 has been moved to http://erxz.com/pb/1455
<9> PerlJam: A-D and D-A cards can be useful for that.
<18> bruc: you won't be new for long.
<4> q[ender]: www.gumstix.com little, cheap linux boxes.
<13> PerlJam: there's no mention of any kind of encoding
<9> bruc: I am full of troubles.
<13> PerlJam: gumstix rox !!
<4> yeah, they do (mostly)
<2> bruc: karma is a measure of $num_times_people_plusedplused_you - $num_times_people_minusminused_you.
<13> I've been about buying one for a while, I think I'll do asap I'll figure what I could use it for
<9> bruc: IRC got the idea of karma from the world outside of IRC.
<15> wow, that's pretty sweet
<5> kspath : ok


Name:

Comments:

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






Return to #perl
or
Go to some related logs:

ubuntu it821x
apt get libdb-4.3
irssi + stalled
callfile asterisk gentoo
#css
#perl
#suse
vt1211: Unknown symbol vid_from_reg
gentoo glibc_2.4
fedora mod_file



Home  |  disclaimer  |  contact  |  submit quotes