| |
| |
| |
|
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
Comments:
<0> mauke: I'd get one of my immediate topic were i to disagree. <1> wsmith: I don't think so. <2> (abstract algebra)++ <1> wsmith: At least, I never do. <3> Can anyone point to an ok toturial of using gettext in a perl program? I think I know the basic syntax, but I don't know how to generate the mo-files <4> google/ <4> ? <3> I tried that, mostly just came up with rpms of it and source repositories <4> -rpm ? <2> have you tried the gettext info manual? <3> ah, no. I'll look at it <2> You have no idea how to do X, but you DO NOT READ THE MANUAL? <5> hey... I've got two related questions. (1) is there any better or more featureful module for keeping track of "things present", rather than just keeping a hash of keys set to 1? (2) is there any algorithmnically better way to see if two such hashes share a key (yes == some key shared, no == none) besides looping over the keys of one of them? <3> integral: The info manual didn't cross my mind. I already tried the manpage and perldoc <2> moron. <3> heh, the standard friendly response I see
<1> ningu: A hash is a pretty standard and efficient way, so that's probably your best bet. <2> info has been around for decades. _decades_. I mean it's the standard GNU replacement for manpages. <6> hi - i want to use i18n for my perl scripts. how can i create the needed po files? <2> estel: info gettext. <7> I hate info. <8> NOds <7> HATE <2> I guess emacs weenies like it *sigh* <2> at least debian policy is man pages for everything <8> I am an emacs weenies and I hate it. <7> ningu: What shortcoming do you percieve in using hashes? <9> Yaakov: ningu clearly doesn't understand hashes as evidenced by his second question <2> They're not a high-level set library <2> I really wish all of GHC's hier. libs were available in perl, and all of CPAN in haskell, on the whole the two are non-intersecting <10> integral: is anyone working on a non-platform-specific cpan? <9> sili: you mean like freepan? <9> sdakota: you have my condolences <11> Did anyone here ever use Games::3D? <11> I'd like to see a Perl program using Games::3D <12> sdakota i have one billion nigerian dollars in escrow and i need someone to help launder it <2> the problem is that freepan and 6pan (or whatever it's called) haven't got anywhere... <10> PerlJam: dunno let me see <10> PerlJam: i guess like freepan, minus the part where is ****s <11> Jetpack ^_^ <13> I have a string that is "\\Server\share" and i need to do a s// to make that into "\\\\Server\\share" <14> File::stat->mode returns an array with one element with something like "17407" does that number need a bitwise operator conversion on it? <11> Jetpack: Want me to write a script for that? (A) <13> i haven't had much luck so far :-( <12> sdakota yes but first i require a deposit of 100k USD :P <13> nm, i got it <11> hey gurus <11> what about making some PerlSoft website <11> all programs etcetera are placed on that... <11> all handy programs that can actually be used... <4> ala cpan/scripts ? <4> ala freshmeat language search for 'perl' ? <15> sdakota I think that kitchen just sank that idea... <11> hmm <11> no, not cpan for scripts... <11> just real programs <11> things that can actually be used <11> not just a small scripty <15> you mean command line / moron ready? <16> lol <13> If I have a string that holds literally two back slashes, so it's "\\", literally. Let's call this string $str, if i do `smblcinet $str`, will smbclinet think that it got one backslash, or two? <7> perl -wle '$str="\\\\"; print `echo $str`' <17> it'll get one because of the shell <7> Demonstrated by the one-liner above. <7> NAUGHTY SHELL <18> eva: $str="\\\\"; print `echo $str` <18> eval: $str="\\\\"; print `echo $str` <19> joey__: Return: 1 <20> eval: my $str = '\\'; print $str,"\n"; <19> Alchemy: \ Return: 1 <21> hey guys, I am a newbie at programming perl. I am trying to write a script that could automate adding users to my cyrus imap server. To add users, I need to communicate through a program called cyradm. Where can I look to find information on using perl to do I/O with a specific program? <17> perl -we '$str = "\\\\"; print `echo \Q$str`' <7> MAWK <7> (not you)
<13> mauke: to a s//, how is this interpreted s/\\/\\\\/, is that "replace 1 backslash with 2" or "replace 2 backslashes with 4"? <22> why does this match: "foo.cgi" =~ /^.+?(?!\.cgi)$/; <17> rutski89: 1 with 2 <23> re <13> mauke: ty :-0 <13> ** :-) <7> HELLO MAUKE <24> eid: Try this: print "Match: $1\n" if "foo.cgi" =~ /^.+?(?!\.cgi)$/ <17> re <24> If you want it to work place the "\." before the negative look-ahead <17> bynari: no capturing groups in pattern <24> What do you mean? <17> $1 isn't set by this regex match <24> Oh <24> Oops <24> eid: Try this: print "Match: $1\n" if "foo.cgi" =~ /^(.+?)(?!\.cgi)$/ <22> bynari, thanks <17> eid: it matches because (?!\.cgi)$ means "not followed by .cgi AND followed by end-of-string" <14> is there a way to convert an octal to decimal? <17> which is the same as $ alone <17> bov: perldoc -f oct <25> The perldoc for oct is at http://perldoc.perl.org/functions/oct.html <24> It matches because .+? slurps the .cgi <22> aha. and .+? eats up everything? even though i got the "?" ? <24> look-aheads and look-behinds aren't part of the match <24> That's why you need the \. outside the lookahead <17> bynari: I don't get it <22> ok <17> (?!foo)$ is the same as $ <17> what does this have to do with \.? <24> Try my code above, mauke <24> You'll see why it's not working <17> eval: "foo.cgi" =~ /^(.+?)(?!\.cgi)$/; $1 <19> mauke: Return: foo.cgi <24> It's not the same as $ though <17> eval: "foo.cgi" =~ /^(.+?)\.(?!cgi)$/; $1 <19> mauke: Return: "foo.cgi" =~ /^(.+?)\.(?!cgi)$/; $1 <17> bynari: why not? <24> Well <24> In this case it is, but that's because the .+ slurps <17> it always is <24> Try /.+?\.(?!cgi)$/ <24> That will not match file.cgi <17> eval: "foo.cgi" =~ /^(.+?)\.(?!cgi)$/; $1 <19> mauke: Return: "foo.cgi" =~ /^(.+?)\.(?!cgi)$/; $1 <17> why does it do that? <24> Look-aheads and look-behinds aren't actually part of the match <24> If you use them in s/// for example they aren't touched <24> So everything up until $ is slurped by the .+ regardless of the "?" <17> bynari: it will not match because it doesn't match /.+?\.$/ either <24> So then when it finishes its slurp it checks the look-ahead <17> simply because the last character isn't . <24> "If there's a .cgi, we fail" <24> But all there is, is a \n <26> bynari: them being in the match would kind of defeat the whole point;) <24> or the end <17> whatever, you're not making sense <24> I'm making sense, you're just not understanding.. <24> Try this <17> bynari: what is the difference between (?!foo)$ and $ ? <24> "foo.bar" =~ /.+?\.(?!cgi)$/ <17> I tried it <24> One will match everything and the other will not match if foo is at the end before the $ <17> bynari: wrong <22> mauke, the thing is this: /.+$/ and /.+?$/ is the same thing - and since the negative look-ahead isn't included it's the same :P <24> How am I wrong? Why does the code match then? <24> Why does "file.cgi" not match and "file.bar" match? <24> If I'm wrong <17> eval: "file.bar" =~ /.+?\.(?!cgi$/ ? "matches" : "bzzt" <19> mauke: Error: Unmatched ( in regex; marked by <-- HERE in m/.+?\.( <-- HERE ?!cgi$/ at (eval 124) line 1. <17> eval: "file.bar" =~ /.+?\.(?!cgi)$/ ? "matches" : "bzzt" <19> mauke: Return: bzzt <17> <17> bynari: it will not match because it doesn't match /.+?\.$/ either <17> <17> simply because the last character isn't .
Return to
#perl or Go to some related
logs:
frame buffer linux i910 install grub fedora not.sda OR not.on.sda OR other.than.sda gnomemeeting ubunto #perl #perl vanderpool tyco gentoo ati-drivers Permission denied cdemu install dapper toogreen shanghai match+U2KAI
|
|