Palm OS
Hello ! I would like to know if i could develop Palm OS applications using Perl. Is there any package out there to do that? Thanks for your attention. H3li0 __ Do You Yahoo!? Yahoo! Auctions - buy the things you want at great prices http://auctions.yahoo.com/
RE: [RFC] Gauntlet for teachers
Could we also agree a suitable acronym for all Perl Questions and replies. I suggest [BPQ] for Beginners Perl Question. That way people can set-up an email folder and move them using a rule. This would go at the start of the subject line. John Preece Technical Consultant Tel : 0121 585 2552 E-Mail : [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] Prestige is the 'Clear Thinking' Technology Partner Visit our new web site www.prestige-systems.co.uk http://www.prestige-systems.co.uk -Original Message- From: Paul [mailto:[EMAIL PROTECTED]] Sent: 21 April 2001 00:11 To: Casey West Cc: [EMAIL PROTECTED] Subject:Re:[RFC] Gauntlet for teachers --- Casey West [EMAIL PROTECTED] wrote: I am quite pleased with the list so far. I have a further challenge for all the teachers out there: Let's create mini tutorials. The note about hashes tripped my memory of wanting to do this. I read about one on sort that should be here soon. :) A good idea. Let's try this: if someone wants a specific tutorial that they think would be generically useful to others as well, post the request with [TUT] in the subject. If someone wants to tackle it, there you go. That way if we're forgetting something, someone can point it out quickly. Information like: reading passwords from the command prompt; taking advantage of Perl's looping constructs; when should and array really be a hash; etc. These tutorials should probably correlate with surrounding discussion. We can then have quite a nice repository to further assist the growth and development of this list. Write up tutorials, send them to the list and Cc: me. I'll bug some folks about creating beginners.perl.org where I'll post them, along with a FAQ and some other info. Let me know what you think! -- Casey West __ Do You Yahoo!? Yahoo! Auctions - buy the things you want at great prices http://auctions.yahoo.com/
RE: Header files dilemma!
I hope this helps, and don't forget to read: perldoc perlmod perldoc perlmodlib perldoc constant perldoc Exporter Ooo, a bibliography at the end of the specific advice -- that's a *great* idea for a beginners list. We should make that a convention :)
Looking for perl specifications on the net
Hi guys and girls , does any one have a web link to perl specifications, (For example, are the specifications for a variable name) ?? Thx
Re: Looking for perl specifications on the net
On Mon, Apr 23, 2001 at 06:20:16AM -0700, Zysman, Roiy wrote: Hi guys and girls , does any one have a web link to perl specifications, (For example, are the specifications for a variable name) ?? Thx If you're talking about style, try perldoc perlstyle -- Paul Johnson - [EMAIL PROTECTED] http://www.pjcj.net
RE: DBI and ORACLE
[Copying the list on a reply to a private email, with permission] A placeholder consists of a single question mark (?) in your query statement. It replaces a single value in your SQL statement. For example: Without placeholders: INSERT INTO MYTABLE VALUES ('Mark', 'Nutter', 'foo', 'bar', 'baz') With placeholders INSERT INTO MYTABLE VALUES (?, ?, ?, ?, ?) Your code looks like this: my $query1=QUERY; INSERT INTO DIFFAMNTS VALUES ($1,$2,$3,$4,$5,$6,$7,$8) # ARE THESE CORRECT??? QUERY This is correct, but it does not use place holders. At run-time, Perl does a string substitution, so if, say, $1 is equal to Mark, $2 is equal to Nutter, and so on, then the query that gets passed to DBI is INSERT INTO DIFFAMNTS VALUES (Mark,Nutter,foo,bar,baz,...) Now, if your columns are non-numeric, that query is not correct, because you need to wrap your non-numeric data values in single quotes, like this: INSERT INTO DIFFAMNTS VALUES ('Mark','Nutter','foo','bar','baz',...) What's cool about placeholders is that you can stop worrying about the difference between quoted and unquoted values -- you don't need to use quotes at all with placeholders. This comes in real handy if you ever need to insert large, multi-line values into a single database column: my $query = EOM; INSERT INTO PAGES (URL, PAGE) VALUES (?, ?) EOM my $sth = $dbh-prepare($query) or die $DBI::errstr; $sth-execute($url, $page) or die $DBI::errstr; Now the $page variable can include newlines, quotes, etc, and you don't have to worry about it. The alternative would blow up in your face: my $query = INSERT INTO PAGES VALUES($url, $page); # Boom! Behind the scenes what's happening is that, with placeholders, key pieces of your data are being processed by DBI/DBD rather than by the Perl language itself. For more sophisticated databases engines like Oracle, placeholders are more efficient than query strings with embedded values. Here's how: # Ordinary query for $bar (qw(Eeny Meeny Miny Mo)) { $query = EOM; INSERT INTO FOO VALUES ('$bar') EOM $sth = $dbh-prepare($query); $sth-execute(); } Each time through the loop, Perl interpolates the value of $bar into the query string, and the database engine gets a new query string that is different from all previous strings: INSERT INTO FOO VALUES ('Eeny') INSERT INTO FOO VALUES ('Meeny') INSERT INTO FOO VALUES ('Miny') INSERT INTO FOO VALUES ('Mo') The database engine has to parse each SQL query, which takes a certain amount of time. Once the query is parsed, then the database actually moves the data from the input buffer into the actual tables. Contrast this with the placeholder approach: # Query with placeholders $query = EOM; INSERT INTO FOO VALUES (?) EOM $sth = $dbh-prepare($query); for $bar (qw(Eeny Meeny Miny Mo)) { $sth-execute($bar); } Thanks to placeholders, we were able to move the prepare() statement outside the loop. The database engine only parses the query once (in the prepare() statement). Then, in the execute() statement, each value is simply copied to the database engine's input buffer, and moved straight to the table. For products that cache queries (e.g. Oracle), this can amount to a significant time savings. Not all database engines support placeholders, so your mileage may vary. I believe some DBD packages fake it by internally doing a plain old string interpolation, so you should be able to safely use placeholders in any DBI application -- worst case it would be no better than not using placeholders, so it's a good bet. Limitations: You can't use placeholders for table or column names. Cheers. Mark Nutter Manager, Internet Applications Development Marconi [EMAIL PROTECTED] It's not necessarily an advantage to have better brakes than the guy behind you.
Validating price (US Currency)
Is there a better way of doing this? Thanks! Dave if ($in{'price'} eq ) {print 'font color=red#8226; Missing/font '; } elsif (checkPrice($in{'price'})) { print 'font color=red#8226; Wrong Format/font'; } sub checkPrice{ if ($_[0] =~ /\$?(\d*)(\.\d{0,2})?/) { return 1; } else { return 0; } } Allowable input: $1 $1.50 2 .50 $.50 - Not allowable input: a $5a $e.40 --
Re: Palm OS
At 02:28 AM 4/23/2001, you wrote: Hello ! I would like to know if i could develop Palm OS applications using Perl. Is there any package out there to do that? Thanks for your attention. H3li0 The short answer is no. The slightly longer answer is that so far no one has made perl run on a PalmOS device yet, but there are a few groups of some really smart people trying to make perl compile and behave in that environment. How far away are they from making it work, I don't know. But I'm waiting for it to. It'll be *so* very cool. : ) So, not yet, but it could be coming. I wish I had a link, but sorry. Anyone else have one? Thank you for your time, Sean.
Re: Validating price (US Currency)
On Mon, Apr 23, 2001 at 11:38:42AM -0400, David Gilden wrote: : Is there a better way of doing this? Dave, here is my take on it, hopefully commented well: #!/usr/local/bin/perl -w use strict; $|++; while ( DATA ) { chomp; print( validate( $_ ) ? 'valid entry' : 'try again punk' ); print \n; } sub validate { my $currency = shift; # return false if we have an empty string or the string is just '$'. return 0 unless length( $currency ) 0 $currency ne '$'; $currency =~ m ^ # The beginning of the string \$?# We may have a $ sign, we may not \s*# We may encounter some space here \d*# We may nave a numerator but could just have '.50' (?:\.?\d{1,2})? # and we might have a denominator $ # The end of the string x ? 1: 0; # true if match succeeded, false otherwise } __DATA__ $ $ 4.000 0 $5 $ 5 $ 5.0 $5.00 5.00 .4 $.60 The output from this program should be: try again punk try again punk try again punk valid entry valid entry valid entry valid entry valid entry valid entry valid entry valid entry which is what I'd expect. I'm sure this won't work in all cased but it handles a few more than your original post. Enjoy! : Thanks! : Dave : : : : if ($in{'price'} eq ) {print 'font color=red#8226; Missing/font '; } : elsif (checkPrice($in{'price'})) { : print 'font color=red#8226; Wrong Format/font'; : } : : : : : sub checkPrice{ : : if ($_[0] =~ /\$?(\d*)(\.\d{0,2})?/) { : return 1; : } else { : return 0; : } : : } : : : Allowable input: : $1 : $1.50 : 2 : .50 : $.50 : - : Not allowable input: : a : $5a : $e.40 : -- -- Casey West
Re: Perl documentation (Net::DNS::RR::MX)
At 06:23 PM 4/19/2001, you wrote: I have a question about the Perl documentation I find on the web that explains the usage of Perl modules. I come across this situation somewhat frequently where I need to do something, find a module that can do it, but just can't figure out from the basic info how to use it. For instance, I'm interested in being able to do MX lookups via Perl so I found Net::DNS::RR::MX which appears to be what I'm looking for... I don't know if this is too late or whatever, but take a look at the Net::DNS documentation. http://search.cpan.org/doc/MFUHR/Net-DNS-0.12/lib/Net/DNS.pm Under the Methods section, there's a really short example of doing MX lookups. Thanks for creating this list. I use Perl a bit to automate a few things and I absolutely love it but I get frustrated a lot because I can't figure out simple things and get stuck. I appreciate the time you guys are devoting to helping us. Matt Goodell Thanks. To tell you honestly, I really appreciate being able to share some of the really cool stuff that I have learned about my favorite little language here to a very receptive and appreciative audience. I hope you don't get too frustrated, but if you do, you know where to look. : ) Thank you for your time, Sean.
RE: help me understand $_
Could you repost the answer? I just joined this group and would love to read the great answer referenced in the post. Thanks, Mike -Original Message- From: Sean O'Leary [mailto:[EMAIL PROTECTED]] Sent: Monday, April 23, 2001 12:30 To: [EMAIL PROTECTED] Subject: Re: help me understand $_ At 07:33 PM 4/22/2001, you wrote: Sean O'Leary -- Damn that was a good explaination! I felt like I understood $_ very well before, but I understand it even better now. A very perlish post indeed. Larry the linguist would be proud! Matt Thanks. : ) I'm glad I could help out. There are lots of tutorials out there that will just say, In case x, you should use y. but I don't think these help people. If you show someone what something is doing there in the larger scheme of things, they look at a situation, decide if it really is best for them to use 'y', use it if it is, or know where else to go if it isn't. Kind of the give a man a fish / teach him to fish proverb. May you go forth and Perl with style and aplomb. Maybe a little swagger, too. Thank you for your time, Sean.
Re: perldoc error
On Mon, Apr 23, 2001 at 01:06:06PM -0500, Boex,Matthew W. wrote: : : when i try to run perldoc, i get the following error. do i need to : alter perldoc itself? i can run all sorts of other perl programs : with modules just fine. From below, it seems that you have a perldoc built for Perl 5.6.x but only have 5.005. This is wierd. To fix this problem you can: A. Get a copy of perldoc for 5.005 from another Perl distribution. B. Build a new Perl distribution C. Try to compile the warnings module from CPAN. Honestly, I'm confused. This isn't supposed to happen on a normal install. : [boex@rootabega boex]$ perldoc : Can't locate warnings.pm in @INC (@INC contains: : /usr/lib/perl5/5.00503/i386-linux /usr/lib/perl5/5.00503 : /usr/lib/perl5/site_perl/5.005/i386-linux /usr/lib/perl5/site_perl/5.005 : .) at /usr/local/bin/perldoc line 5. : BEGIN failed--compilation aborted at /usr/local/bin/perldoc line 5. -- Casey West
Admin idea
Would it be possible to add a Reply-To header to all the messages originating from this list. That way we would point back to the list for regular replies, and we could still get the original poster's info from the From header. I think this would be a good idea, and pretty convenient. It seems to work well for many other lists. I would also like to second the motion for an addition of a standard prefix to every subject header. However, I don't think this should be done by the individual, it should be stuck there by the list server. After all, how is someone just joining going to know that they have to head their messages a certain way. Thank you for your time, Sean O'Leary
Re: Validating price (US Currency)
On Mon, Apr 23, 2001 at 01:15:13PM -0400, David Gilden wrote: [ brought back to the list with permission ] my camel learning perl book has hashs with the key in quotes, whats going on with this? In the early days this was necessary, otherwise the key would be interpreted as a function and its result used as the key. I don't think this has been necessary since perl 5.005, But, be careful if your key actually has the same name a function. Things can get confusing. For you if not for perl itself. The camel's getting pretty long in the tooth now. And is there a short hand for the following? checkPrice($in{price}); I was going to mention this before, but I forgot. Calling a sub as sub() is so .. perl4. Of course it's still supported and correct, but I find it helpful to remove superfluous punctuation. I think it helps to make the meat of the program stand out. sub checkPrice{ return ($_[0] =~ /^\$?(\d+|\d*\.\d\d)$/) ? 1 : 0; } # can this be rewritten as: sub checkPrice{ return ( /^\$?(\d+|\d*\.\d\d)$/) ? 1 : 0; } No. $_ isn't set on entry to a sub - @_ is. So you will need the first version, but there is no need for the ?: operator. sub checkPrice { return $_[0] =~ /^\$?(\d+|\d*\.\d\d)$/ } Be careful when manipulating @_ though. Perl uses pass-by-reference, so changing @_ changes the actual arguments passed to the sub. This is why many subs start off with my ($a1, $a2, $a3) = @_ or something similar. This takes copies of the arguments and effectively gets you pass-by-value semantics. Depending on how defensive you are being, you might want to check that you are being passed one and only one parameter, possibly by using a prototype or checking the length of @_. Also, for a function this size I would personally also get rid of the return keyword. All subs return the value of their last expression when they fall off the end, and so I would use sub checkPrice { $_[0] =~ /^\$?(\d+|\d*\.\d\d)$/ } but I know some people are (violently) against this sort of thing. I like using Perl's idioms, and with something this size I think it's pretty obvious what's happening. For another can of worms, I would also go with check_price() as the name of the sub. See perldoc perlstyle. But this is very personal. The convention where I work is checkPrice() and I don't like it, but I'm learning to live with it. Almost :-) -- Paul Johnson - [EMAIL PROTECTED] http://www.pjcj.net
RE: Rookie Question
The Term::ReadLine package is one option.. You might also try the native perl function getc. Bruce W. Lowther [EMAIL PROTECTED] Micron Technology, Inc. Boise, Idaho -Original Message- From: Goodman Kristi - kgoodm [mailto:[EMAIL PROTECTED]] Sent: Monday, April 23, 2001 1:05 PM To: '[EMAIL PROTECTED]' Subject: Rookie Question I have this line of code in my program: print Did everything look ok? (Y/N); chomp ($check = STDIN); $check = \U$check; if (\U$check ne Y) {die Well. . . go back and try again until you get it right!!!\n}; How would I fix it where the user did not have to ENTER after they typed a Y or N. Thanks for your help!
sysread and buffering
Hi all. I'm trying to do what I think is a very simple thing. I want to read keyboard input char by char and time the difference between each keystroke. I've tried using while (sysread STDIN, $key, 1) { dostuff }; but that seems to be doing some kind of buffering so that the body of the while loop is only executed after a carriage return. i'm using activeperl on a windows machine. is it possible to do what i want to do in perl? is there another call i should be using? TIA janet
Re: sysread and buffering
At 05:25 PM 4/23/2001, Janet Lee wrote: Hi all. I'm trying to do what I think is a very simple thing. I want to read keyboard input char by char and time the difference between each keystroke. I've tried using while (sysread STDIN, $key, 1) { dostuff }; but that seems to be doing some kind of buffering so that the body of the while loop is only executed after a carriage return. i'm using activeperl on a windows machine. is it possible to do what i want to do in perl? is there another call i should be using? TIA janet The reason why some of this is going on (only executing after the return) probably has to do with input buffering and such. I thought sysread was supposed to bypass that (that is, read from the file, really, not the buffer that's hanging around looking like the file, but I could be wrong.) You may be able to do some stuff to STDIN to turn all the buffering off, but I think that might be more trouble than it's worth. I think the module that you want is: http://search.cpan.org/search?dist=TermReadKey You can install it with PPM, no problem. If you need help with that, just write back to the list saying so. Thank you for your time, Sean.
RE: Header files dilemma!
from my experience in c.l.p.misc some people take those bibliographies as a disguised RTFMs .. I'd love to see it for all posts - but am afraid at how some beginners might interpret it -- jason king No children may attend school with their breath smelling of wild onions in West Virginia. - http://dumblaws.com/ -Original Message- From: Nutter, Mark [mailto:[EMAIL PROTECTED]] Sent: Mon 23 Apr 2001 22:51 To: '[EMAIL PROTECTED]' Subject: RE: Header files dilemma! I hope this helps, and don't forget to read: perldoc perlmod perldoc perlmodlib perldoc constant perldoc Exporter Ooo, a bibliography at the end of the specific advice -- that's a *great* idea for a beginners list. We should make that a convention :)
Re: My My
The perl documentation (perldoc -f my) has this to say about the perl builtin my: A my declares the listed variables to be local (lexically) to the enclosing block, file, or eval. If more than one value is listed, the list must be placed in parentheses. See Private Variables via my() in the perlsub manpage for details. The section on lexical scoping it refers to is an excellent explanation, but I'll try to add the way I think of it just because... The english meaning of my is a rather possesive one. It means that this thing here belongs to ME and almost more importantly, not to you. It's not ours (or I would have said it was), and the ownership of this thing is not abmiguous. It's mine - and mine only. My accomlishes the same thing in perl. Andy Says 'My Apple' #declares that is is an apple, and that it belongs to this Andy my Foo; # pre-declares this as a lexically scoped variable belonging to the part of the program that called it. What my does, is tell perl how much of the program has that particular variable. Consider the following: $variable = Apple\n foreach (0 .. 9) { $variable = orange\n; print $variable; } print $variable; The above code will print out 11 lines of orange, because when you change the value of $variable within the foreach loop, you're changing the value. By default, variables attempt to be global in perl. now let's play with my $variable = Apple\n; foreach (0 .. 9) { my $variable = orange\n; print $variable; } print $variable; The second example there will print our 10 lines of Orange followed by one of Apple. The reason for this is that the variable which is set outside the block of code run by the foreach loop is now a completely different variable from the one set inside the block of code run by the foreach loop. The use of my tells perl that while the main block of the program owns a variable called $variable, the foreach loop owns a completely different variable, which just co-incidentally also happens to be named $variable. The possesiveness of the word is retained in perl. My scopes a variable to the block of code in which it is declared. Of course none of this would be complete without mentioning that the newly introduced keyword our is equally as permissive in perl as it is in the english language ;) Hope that helps. --A SunDog wrote: Hello everyone, I'm new to PERL ... and have a question about a style/format I've observed where 'my' is placed in front of arrays, hashes - you name it ... At first I interpreted this as a Nemonic name but several functions might have this in the same code .. what gives ?
Re: Header files dilemma!
On Tue, Apr 24, 2001 at 09:59:46AM +1000, King, Jason wrote: : from my experience in c.l.p.misc some people take those bibliographies as a : disguised RTFMs .. I'd love to see it for all posts - but am afraid at how : some beginners might interpret it It is extremely welcome provided there is a nice description of why to read them, or code examples that fortify the need to read them. The ultimate goal is that people read and re-read the documentation before asking questions. I would hope for that even here ( note I said hope ). In answering questions, it is essential to consider how you can shape and equip new commers for their coding future. Answering to just answer only does half the job. -- Casey West
RE: print with = ??
David Gilden writes .. Sorry to ask this, as I am quite new at this. And the online class that I am just now finishing has lots of bad code for examples! From this list: print '$file' = '$newfile'\n; ^ What does this line mean, this a renaming convention? there's no renaming happening .. it's a print statement .. basically it's of the form print some text; see the double-quotes in the original statement .. they tell Perl to print everything in between the quotes and perform variable interpolation on the way .. so both $file and $newfile will have their values substituted for them in the string the single quotes are within the double quotes - so they're just part of the print output and the = is just a sequence of two characters that will also be printed (although it means other things in other contexts) this is all because there are double-quotes around everything .. so as far as Perl is concerned - it's just a string to be printed -- jason king No children may attend school with their breath smelling of wild onions in West Virginia. - http://dumblaws.com/
RE: quick PERL question
M.W. Koskamp writes .. The special variable $| sets the autoflush. See PERLVAR documentation. Whats this person does is a dirty way of setting $| to a true value (not 0 or undef). Default = 0. why do you say 'dirty' ? .. do you just mean 'less readable' ? .. or are you implying some other problem with $|++ ? -- jason king No children may attend school with their breath smelling of wild onions in West Virginia. - http://dumblaws.com/
RE: Re: [RFC] Gauntlet for teachers
Why bother with acronyms that many won't use when in most email programs it is trivial to write an email filter that examines whether To: or CC: contains [EMAIL PROTECTED] and send it to a particular folder? (or write two filters, one for To: and one for CC:, both sending to the same folder. Seems like an unnecessary reinvention of the wheel. --Dennis King, Jason wrote: I can't see those acronyms working because a beginner is just going to ask the question - and at best they're going to try and guess what acronym to use with their limited knowledge of Perl and limited perspective with which to make a worthwhile guess and if you continue to do what you're doing - ie. changing the subject of the original message by adding your acronym prefix - then you break some mail readers which sort or group based on the subject now .. admittedly - those mail readers could be said to be broken .. but some of us (me) don't have a big choice (because we're contractors on standard platforms) and it alienates us :( -- jason king No children may attend school with their breath smelling of wild onions in West Virginia. - http://dumblaws.com/ -Original Message- From: John Preece [mailto:[EMAIL PROTECTED]] Sent: Mon 23 Apr 2001 20:43 To: Casey West Cc: [EMAIL PROTECTED] Subject: RE: [RFC] Gauntlet for teachers Could we also agree a suitable acronym for all Perl Questions and replies. I suggest [BPQ] for Beginners Perl Question. That way people can set-up an email folder and move them using a rule. This would go at the start of the subject line. John Preece Technical Consultant Tel : 0121 585 2552 E-Mail : [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] Prestige is the 'Clear Thinking' Technology Partner Visit our new web site www.prestige-systems.co.uk http://www.prestige-systems.co.uk -Original Message- From: Paul [mailto:[EMAIL PROTECTED]] Sent: 21 April 2001 00:11 To:Casey West Cc:[EMAIL PROTECTED] Subject: Re:[RFC] Gauntlet for teachers --- Casey West [EMAIL PROTECTED] wrote: I am quite pleased with the list so far. I have a further challenge for all the teachers out there: Let's create mini tutorials. The note about hashes tripped my memory of wanting to do this. I read about one on sort that should be here soon. :) A good idea. Let's try this: if someone wants a specific tutorial that they think would be generically useful to others as well, post the request with [TUT] in the subject. If someone wants to tackle it, there you go. That way if we're forgetting something, someone can point it out quickly. Information like: reading passwords from the command prompt; taking advantage of Perl's looping constructs; when should and array really be a hash; etc. These tutorials should probably correlate with surrounding discussion. We can then have quite a nice repository to further assist the growth and development of this list. Write up tutorials, send them to the list and Cc: me. I'll bug some folks about creating beginners.perl.org where I'll post them, along with a FAQ and some other info. Let me know what you think! -- Casey West __ Do You Yahoo!? Yahoo! Auctions - buy the things you want at great prices http://auctions.yahoo.com/ -- - Dennis Bass Dude Fox | [EMAIL PROTECTED] OR [EMAIL PROTECTED] Bureaucracy is the art of making the possible impossible -Javier Pascual Salcedo -
print statment
Original from the class: print input type=\checkbox\ name=\delete\ value=\yes\ checked\n; Is this bad style? print 'input type=checkbox name=delete value=yes checked',\n; better? print 'input type=checkbox name=delete value=yes checked'. \n; I do believe that these 3 statements are all equivalent. Thanks Dave
RE: print statment
David Gilden writes .. Original from the class: print input type=\checkbox\ name=\delete\ value=\yes\ checked\n; Is this bad style? yep .. avoid backwhacks at all costs - that's my opinion print 'input type=checkbox name=delete value=yes checked',\n; better? yep .. much better print 'input type=checkbox name=delete value=yes checked'. \n; also good - but generally accepted as inferior to the second snippet I do believe that these 3 statements are all equivalent. nope .. but the differences are subtle .. the first one is essentially equivalent to the last one .. but the one with the comma is different in that it passes two parameters as a list to the print function and can be affected by the built-in variable $, to see the difference try this code snippet $, = '_wow_'; print 'foo', 'bar', \n; print 'foo'. 'bar'. \n; but - use of $, is pretty rare and usually discouraged and the second snippet that you showed is the best of the three even better is to realise that double-quotes are operators .. specifically they're shorthand for the qq// operator .. in other words the following two are EXACTLY equivalent to Perl print foobar\n; print qq/foobar\n/; so .. when you want to include double-quotes AND have the string interpolated you can do this print qq/input type=checkbox name=delete value=yes checked\n/; also note that the '/' character is not the only delimiter that you can use .. you can use anything .. so the following are all equivalent to the above print qq#input type=checkbox name=delete value=yes checked\n#; print qq*input type=checkbox name=delete value=yes checked\n*; print qq|input type=checkbox name=delete value=yes checked\n|; even the rather obfuscated print qq qinput type=checkbox name=delete value=yes checked\nq; you can even use bracketing constructs and Perl will pair them up .. so the following works a treat print qq(some more parens () in here - perl isn't fooled\n); Manual Refereces: Quote and Quote-like Operators section of perlop manual -- jason king No children may attend school with their breath smelling of wild onions in West Virginia. - http://dumblaws.com/
PERL Software Installation
Hi Kindly advice me how to install Perl Software in the below Operating Systems: 1. Linux 2. Windows 98 Thanks, SV
Re: Palm OS
Thank you for the information. ;-) H3li0 --- Sean O'Leary [EMAIL PROTECTED] wrote: At 02:28 AM 4/23/2001, you wrote: Hello ! I would like to know if i could develop Palm OS applications using Perl. Is there any package out there to do that? Thanks for your attention. H3li0 The short answer is no. The slightly longer answer is that so far no one has made perl run on a PalmOS device yet, but there are a few groups of some really smart people trying to make perl compile and behave in that environment. How far away are they from making it work, I don't know. But I'm waiting for it to. It'll be *so* very cool. : ) So, not yet, but it could be coming. I wish I had a link, but sorry. Anyone else have one? Thank you for your time, Sean. __ Do You Yahoo!? Yahoo! Auctions - buy the things you want at great prices http://auctions.yahoo.com/