Re: FW: Html within code

2007-07-25 Thread Ovid
the main flow of the program. Cheers, Ovid -- Buy the book - http://www.oreilly.com/catalog/perlhks/ Perl and CGI - http://users.easystreet.com/ovid/cgi_course/ Personal blog - http://publius-ovidius.livejournal.com/ Tech blog - http://use.perl.org/~Ovid/journal/

Re: Exception handling in perl

2007-07-12 Thread Ovid
($file) for reading: $!; Cheers, Ovid -- Buy the book - http://www.oreilly.com/catalog/perlhks/ Perl and CGI - http://users.easystreet.com/ovid/cgi_course/ Personal blog - http://publius-ovidius.livejournal.com/ Tech blog - http://use.perl.org/~Ovid/journal/ -- To unsubscribe, e-mail

Test::Class fixture problem

2007-06-29 Thread Ovid
-SUPER::startup; $test-_make_test_servers( num_servers = 2, username= 'Ovid', ); } As you can see, I called SUPER::startup instead of SUPER::setup. My base class has stubs for these methods to ensure that I never have a problem with SUPER:: sub startup

Re: Is there a perl equivalent to PHP variables $_POST and $_GET?

2007-06-11 Thread Ovid
'); my $name = param('name'); my @sports = param('sport'); # e.g. sport=basketball;sport=football Cheers, Ovid -- Buy the book -- http://www.oreilly.com/catalog/perlhks/ Perl and CGI -- http://users.easystreet.com/ovid/cgi_course/ -- To unsubscribe, e-mail: [EMAIL PROTECTED

Re: Leaving this list.

2007-06-05 Thread Ovid
addresses, this could make mailing list software more interesting. Cheers, Ovid -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Re: New to OO Perl

2007-05-03 Thread Ovid
, Ovid -- Buy the book -- http://www.oreilly.com/catalog/perlhks/ Perl and CGI -- http://users.easystreet.com/ovid/cgi_course/ -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Re: how to know the object type

2007-04-04 Thread Ovid
attention to what type of reference it is. There are many, many years of collective wisdom in that* Cheers, Ovid * Yes, there are time you may need to know what the reference is, but this is usually with black magic type wizardry. With all due respect, if you have to ask how to figure out what

Re: how to know the object type

2007-04-03 Thread Ovid
/?node_id=75578 Cheers, Ovid -- Buy the book -- http://www.oreilly.com/catalog/perlhks/ Perl and CGI -- http://users.easystreet.com/ovid/cgi_course/ -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Re: Off-Topic: Is the Randall Schwartz of Perl Fame?

2007-03-05 Thread Ovid
. Randal (they misspelled his name) should never have been convicted. Cheers, Ovid -- Buy the book -- http://www.oreilly.com/catalog/perlhks/ Perl and CGI -- http://users.easystreet.com/ovid/cgi_course/ -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL

Re: putting ; as a replacement in the substitution.

2007-01-21 Thread Ovid
data out of the string. Cheers, Ovid -- Buy the book -- http://www.oreilly.com/catalog/perlhks/ Perl and CGI -- http://users.easystreet.com/ovid/cgi_course/ -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Re: putting ; as a replacement in the substitution.

2007-01-21 Thread Ovid
features) in perlre but not quite sure what they mean. Yes, that's correct. Sometimes you want to group something but not capture it to a variable: if ( $some_var =~ /(?:foo|bar)/ ) { # matched by not captured ... } Hope that helps. Cheers, Ovid -- Buy the book -- http

Re: Get summery of a jpeg file

2007-01-16 Thread Ovid
, Ovid -- Buy the book -- http://www.oreilly.com/catalog/perlhks/ Perl and CGI -- http://users.easystreet.com/ovid/cgi_course/ -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Re: regex to split whitespace-separated values

2007-01-09 Thread Ovid
', '200', '300', '50' ]; Cheers, Ovid -- Buy the book -- http://www.oreilly.com/catalog/perlhks/ Perl and CGI -- http://users.easystreet.com/ovid/cgi_course/ -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL

Re: regex to split whitespace-separated values

2007-01-09 Thread Ovid
--- Rob Dixon [EMAIL PROTECTED] wrote: The default behaviour can be invoked explicitly by using a single space as the separator parameter for split. So my @array = split ' ', $line; has the desired effect. Ah, thank you. I didn't know that :) Cheers, Ovid -- Buy the book -- http

Re: Free Perl Editor

2007-01-02 Thread Ovid
you want. Cheers, Ovid -- Buy the book -- http://www.oreilly.com/catalog/perlhks/ Perl and CGI -- http://users.easystreet.com/ovid/cgi_course/ -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Re: php's __FUNCTION__ equivalent in Perl

2007-01-02 Thread Ovid
{ return (caller(0))[3]; } See 'perldoc -f caller' for more information. Cheers, Ovid -- Buy the book -- http://www.oreilly.com/catalog/perlhks/ Perl and CGI -- http://users.easystreet.com/ovid/cgi_course/ -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail

Re: Perl equivalent of PHP extract()?

2006-12-18 Thread Ovid
2: http://perl.plover.com/varvarname2.html Part 3: http://perl.plover.com/varvarname3.html Cheers, Ovid -- Buy the book -- http://www.oreilly.com/catalog/perlhks/ Perl and CGI -- http://users.easystreet.com/ovid/cgi_course/ -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional

Re: Devel::Dprof

2006-12-15 Thread Ovid
. It works fairly well (and you can get per-line profiling with Devel::SmallProf). Ironically, in trying to profile some code recently, Devel::Profile was segfaulting and Devel::Dprof was not, so your mileage may vary. Cheers, Ovid -- Buy the book -- http://www.oreilly.com/catalog/perlhks/ Perl

Re: Conditional sorting across two arrays

2006-12-12 Thread Ovid
into this problem :-) Please don't link to copyrighted work which has been posted to the Web in violation of said copyright. Writing a book is hard work and unless the author deliberately wants their book to be given away for free, we should respect the author's desire to earn a living. Cheers, Ovid -- Buy

Re: CYGWIN Uninstall

2006-12-11 Thread Ovid
to keep a list focused on the topic can be *hard*. Cheers, Ovid -- Buy the book -- http://www.oreilly.com/catalog/perlhks/ Perl and CGI -- http://users.easystreet.com/ovid/cgi_course/ -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http

Re: Analize Java source file with perl?

2006-10-26 Thread Ovid
that. I couldn't use both {quoted} and {comment} in the same program without that. I probably misread the docs somewhere. Cheers, Ovid #!/usr/bin/perl -l use strict; use warnings; use HOP::Lexer 'string_lexer'; use Regexp::Common; Regexp::Common-import('comment

Re: use strict and local variables

2006-10-16 Thread Ovid
of @_ is then passed to the calling subroutine. It's then very easy, when refactoring, to use subname instead of subname(). Avoid that ampersand unless you know exactly why you're using it :) Cheers, Ovid -- Buy the book -- http://www.oreilly.com/catalog/perlhks/ Perl and CGI -- http://users.easystreet.com/ovid

Re: Including a file with common variables...

2006-10-08 Thread Ovid
, either. It was very frustrating to work on. The system uses some of the features you're asking for help with. Please don't make the same mistakes :) Cheers, Ovid -- Buy the book -- http://www.oreilly.com/catalog/perlhks/ Perl and CGI -- http://users.easystreet.com/ovid/cgi_course

Re: Multiple .cgi scripts vs. one large script

2006-06-15 Thread Ovid
that much. The don't worry about performance at first concept is one that many programmers balk at, but once you adopt it, it makes life much, much easier. Cheers, Ovid -- If this message is a response to a question on a mailing list, please send follow up questions to the list. Web

Re: Need help parsing QUERY_STRING_UNESCAPED

2006-05-23 Thread Ovid
were discussed in http://www.perlmonks.org/?node_id=54318. Hopefully that will give you further clues. Cheers, Ovid -- If this message is a response to a question on a mailing list, please send follow up questions to the list. Web Programming with Perl -- http://users.easystreet.com/ovid

Re: How to do a static variable that persists from page to page

2006-04-28 Thread Ovid
tampered with } Note that a random secret key can be problematic. Using different secret keys for creating the digest and testing the digest guarantees that the digests will not match. Cheers, Ovid -- If this message is a response to a question on a mailing list, please send follow up

Re: Pointers on security sought for CGI

2006-03-15 Thread Ovid
, Glad you're thinking about security early. Too many folks don't. I have a brief introduction to CGI security at http://users.easystreet.com/ovid/cgi_course/lessons/lesson_three.html. It's not complete, but it covers the basics (there are a lot of things about cookies which I should have covered

Re: checking existance of an item in an array

2006-02-06 Thread Ovid
%safe_destination = ( 'a.htm' = 1, 'b.htm' = 1, 'c.htm' = 1, ); In this case, the values are irrelevant. We're just using a hash as a lookup table. Cheers, Ovid -- If this message is a response to a question on a mailing list, please send follow up questions to the list. Web Programming

Re: incorporer du php dans une page en perl-cgi ?

2005-12-03 Thread Ovid
; our @var; push @var, hello; push @var, goodbye; my $p = PHP::Interpreter-new; $p-eval(q/ $perl = Perl::getInstance(); function bar() { $value = $perl-getVariable('$main::var[0]'); return $value; } /; print $p-bar(); # should print hello Cheers, Ovid

Re: Taking Multiple Values for The Same Form Field.

2005-10-29 Thread Ovid
, there should be a query string in the entity-body and CGI.pm *should* handle this correctly. Cheers, Ovid -- If this message is a response to a question on a mailing list, please send follow up questions to the list. Web Programming with Perl -- http://users.easystreet.com/ovid/cgi_course

Re: Taking Multiple Values for The Same Form Field.

2005-10-28 Thread Ovid
--- Sara [EMAIL PROTECTED] wrote: use CGI; my $q = new CGI; my $name = $q-param('name'); Now What as multiple name values will be coming.?? Use list context: my @names = $q-param('name'); Cheers, Ovid -- If this message is a response to a question on a mailing list

Re: CGI parameters

2005-10-25 Thread Ovid
'); foreach my $name ( param() ) { # assumes single value params print $name: . param($name) . \n; } Which style you prefer will depend upon your needs and tastes. Cheers, Ovid -- If this message is a response to a question on a mailing list, please send follow up questions to the list

Re: CGI parameters

2005-10-24 Thread Ovid
bytes, you run the risk of exposing you code to a security hole known as the null byte hack. I explain the latter in lesson three of my CGI course: http://users.easystreet.com/ovid/cgi_course/lessons/lesson_three.html Cheers, Ovid -- If this message is a response to a question on a mailing list

Re: $CGI::DISABLE_UPLOADS

2005-10-19 Thread Ovid
this, you'll want to look into mod_perl or some other technology which allows Perl to have access to the full server request cycle. Cheers, Ovid -- If this message is a response to a question on a mailing list, please send follow up questions to the list. Web Programming with Perl -- http

Re: New Website for Perl Beginners: perlmeme.org

2005-10-02 Thread Ovid
of addressing the many irrational anti-Perl memes, it really needs to get things right. Cheers, Ovid -- If this message is a response to a question on a mailing list, please send follow up questions to the list. Web Programming with Perl -- http://users.easystreet.com/ovid/cgi_course

Re: How big is too big?

2005-09-17 Thread Ovid
a bit. Quality goes up because I discovered that code which is easy to test is generally better code. Productivity has gone up because developing higher quality code and constantly refactoring means that my code base is much easier to work with. I'm rarely hacking around problems. Cheers, Ovid

Re: How big is too big?

2005-09-17 Thread Ovid
--- Tony Frasketi [EMAIL PROTECTED] wrote: Thank a lot Ovid Your explanation enlightened me to the existance of the variousTest modules... You're quite welcome. Test::Unit http://search.cpan.org/perldoc/Test::Unit is an interesting XUnit-style testing library. I wouldn't use

Re: Yet another package problem

2005-09-16 Thread Ovid
to ask. Cheers, Ovid -- If this message is a response to a question on a mailing list, please send follow up questions to the list. Web Programming with Perl -- http://users.easystreet.com/ovid/cgi_course/ -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL

RE: Use of uninitialized value

2005-09-14 Thread Ovid
'; } print bar(); } print bar(); If you really need lexically scoped subroutines, assign an anonymous subroutine to a scalar: sub foo { my $bar = sub { return 'bar'; }; print $bar-(); } # no access to $bar from here Cheers, Ovid -- If this message is a response to a question

Re: CGI.PM and IF statment....

2005-09-10 Thread Ovid
and write the condition like this: if ($mt) { ... } Cheers, Ovid -- If this message is a response to a question on a mailing list, please send follow up questions to the list. Web Programming with Perl -- http://users.easystreet.com/ovid/cgi_course/ -- To unsubscribe, e-mail: [EMAIL

Re: Exact matching using GREP.

2005-09-08 Thread Ovid
from array for 'php' if the $row-{CAT_TITLE} is 'php' it prints php/counters, php/forums and every element containing php. Assuming I understood your question correctly: if (grep { $_ eq $row-{CAT_TITLE} } @present) { # do something } Cheers, Ovid -- If this message is a response

Re: count how many tags

2005-08-31 Thread Ovid
/a /body And the output: list_o0 list_no1 title1 ltl_title3 paragraph1 link1 Cheers, Ovid -- If this message is a response to a question on a mailing list, please send follow up questions to the list. Web Programming with Perl -- http

Re: count how many tags

2005-08-31 Thread Ovid
--- Ovid [EMAIL PROTECTED] wrote: First, I would suggest that you're trying to count two different things, tags and attributes. You may wish to separate them. The following code will do what you want. It uses the HTML::TokeParser::Simple module to make this relatively easy to read. I

Re: upload question

2005-08-25 Thread Ovid
FILEHANDLE,SCALAR,LENGTH Attempts to read LENGTH characters of data into variable SCALAR from the specified FILEHANDLE. Cheers, Ovid -- If this message is a response to a question on a mailing list, please send follow up questions to the list. Web Programming with Perl -- http

Re: getstore and comments

2005-08-19 Thread Ovid
may wish to read my CGI Course at http://users.easystreet.com/ovid/cgi_course/ I cover similar issues and I also discuss the values of taint checking. Hope this helps! Cheers, Ovid -- If this message is a response to a question on a mailing list, please send follow up questions to the list. Web

Re: htaccess question

2005-08-11 Thread Ovid
event, when using .htaccess, I would strongly recommend using it over a secure connection. Cheers, Ovid -- If this message is a response to a question on a mailing list, please send follow up questions to the list. Web Programming with Perl -- http://users.easystreet.com/ovid/cgi_course

RE: How to grep out contnts of a column

2005-07-11 Thread Ovid
, but there are numerous on the CPAN. Which module should I download next? Filter::Util::Call is in Filter: http://search.cpan.org/dist/Filter/ Cheers, Ovid -- If this message is a response to a question on a mailing list, please send follow up questions to the list. Web Programming with Perl -- http

Re: HTML::Templates

2005-06-28 Thread Ovid
state in a local session and give them a cookie with the session key? Cheers, Ovid -- If this message is a response to a question on a mailing list, please send follow up questions to the list. Web Programming with Perl -- http://users.easystreet.com/ovid/cgi_course/ -- To unsubscribe, e-mail

Re: Just to know why ?: is not working here

2005-06-13 Thread Ovid
Cheers, Ovid -- If this message is a response to a question on a mailing list, please send follow up questions to the list. Web Programming with Perl -- http://users.easystreet.com/ovid/cgi_course/ -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED

Re: Hash array

2005-05-13 Thread Ovid
} }; # missing a curly Cheers, Ovid -- If this message is a response to a question on a mailing list, please send follow up questions to the list. Web Programming with Perl -- http://users.easystreet.com/ovid/cgi_course/ -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL

Re: Variables in Modules

2005-04-13 Thread Ovid
and, if it ever gets set to a bad value, you have only one place to put your debugging code. Cheers, Ovid -- If this message is a response to a question on a mailing list, please send follow up questions to the list. Web Programming with Perl -- http://users.easystreet.com/ovid/cgi_course

Re: Errors while inserting into long data type

2005-04-11 Thread Ovid
is that a potential security hole if done incorrectly, but I believe some DBD's will choke if $some_var is too large. Try using a bind variable and see if that avoids the problem: my $sth = $dbh-prepare(INSERT INTO TABLE (name) VALUES (?)); $sth-execute($some_var); Cheers, Ovid --- Mallik

Re: Calling subroutines

2005-03-21 Thread Ovid
{ # die or go to a default page } Solutions like this is generally easy to understand (particular when using named actions). Cheers, Ovid -- If this message is a response to a question on a mailing list, please send follow up questions to the list. Web Programming with Perl -- http

Re: Challenge (for me, at least)

2005-02-18 Thread Ovid
( $device = STDIN ) if ! $device; That would be tougher, but I wouldn't squeeze all of that onto one line because after a bit, readability suffers. Also, if you have a CGI script, just what are you expecting to read from STDIN in that third line? :) Cheers, Ovid = If this message is a response

Re: Favorite Perl CGI Framework for Web Site Development?

2005-02-11 Thread Ovid
it. There's also OpenInteract (http://www.openinteract.org/). I know nothing about it, but it's been around for a while so presumably (?) it's stable and well-tested. Cheers, Ovid = If this message is a response to a question on a mailing list, please send follow up questions to the list. Web

Re: Generating a hierarchy path

2005-02-11 Thread Ovid
://www.unixwiz.net/techtips/sql-injection.html). I've converted the code to use bind values to prevent this security problem. See perldoc DBI and read the section entitled Placeholders and Bind Values. Cheers, Ovid sub pathmenu { my ($dbh, $page_hash, $mutterid, $page_type) = @_; my ($muttertype) = $dbh

Re: perl-CGI module - post method

2005-02-08 Thread Ovid
'})) { print $buffer; } else { print Could not read STDIN; } } else { print Don't know how to handle '$ENV{REQUEST_METHOD'; } I have more information about this at Lesson 2 (http://users.easystreet.com/ovid/cgi_course/lessons/lesson_two.html) of my course. Cheers, Ovid

Re: print $q-p(with CSS)

2005-01-16 Thread Ovid
information. Cheers, Ovid = Silence is Evil http://users.easystreet.com/ovid/philosophy/decency.html Ovid http://www.perlmonks.org/index.pl?node_id=17000 Web Programming with Perl http://users.easystreet.com/ovid/cgi_course/ -- To unsubscribe, e-mail: [EMAIL

Re: Read Write to file .. need help

2005-01-14 Thread Ovid
.html) Cheers, Ovid = Silence is Evil http://users.easystreet.com/ovid/philosophy/decency.html Ovid http://www.perlmonks.org/index.pl?node_id=17000 Web Programming with Perl http://users.easystreet.com/ovid/cgi_course/ -- To unsubscribe, e-mail: [EMAIL

RE: Use Strict

2005-01-13 Thread Ovid
into a proper module and using Exporter. References: perldoc -f my perldoc -f package perldoc perlmod perldoc Exporter Cheers, Ovid = Silence is Evil http://users.easystreet.com/ovid/philosophy/decency.html Ovid http://www.perlmonks.org/index.pl?node_id=17000

Re: Why executable?

2003-08-14 Thread Ovid
of this hole. Cheers, Ovid --- fliptop [EMAIL PROTECTED] wrote: On Mon, 11 Aug 2003 at 22:36, Octavian Rasnita opined: [snip] OR:I've tried chmodding the perl script to 755, and I've tried running it OR:with: OR: OR:$ script.pl OR: OR:...but it didn't want to run, telling me

Re: how do i list the methods connected to a object?

2003-08-14 Thread Ovid
. Of course, people seem to get mad when I say that :) Cheers, Ovid = Silence is Evilhttp://users.easystreet.com/ovid/philosophy/indexdecency.htm Ovid http://www.perlmonks.org/index.pl?node_id=17000 Web Programming with Perl http://users.easystreet.com/ovid

Re: how do i list the methods connected to a object?

2003-08-08 Thread Ovid
) { # almost the same thing, but doesn't die a horrible death if, for example, # $object is undef } If you explain the problem you're trying to solve, we might be able to come up with a better solution. Cheers, Ovid = Silence is Evilhttp://users.easystreet.com/ovid

Re: print HTML code; in NETSCAPE

2003-08-04 Thread Ovid
it and then print it out as HTML. Many people have been bitten by Microsoft deciding to second-guess us. (It's also opened up some nasty security holes). Cheers, Ovid = Silence is Evilhttp://users.easystreet.com/ovid/philosophy/indexdecency.htm Ovid http

Re: MVC - the 'meme drift'

2003-07-31 Thread Ovid
thoughts, go read Dominus' presentation on the topic (http://perl.plover.com/yak/design/). I, however, am pretty much done here. I have work to do :) Cheers, Ovid = Silence is Evilhttp://users.easystreet.com/ovid/philosophy/indexdecency.htm Ovid http

Re: return(bless $rant, $class) || Fwd: PHP vs Perl

2003-07-30 Thread Ovid
--- drieux [EMAIL PROTECTED] wrote: Ovid, I love the smell of 'primate-ism' It could be merely the way that you are presenting the problem - and a desire to defend an anachronistic model of MVC, based upon the underlying 'primate-ism', and the scary thought of 'recursion

Re: eleminating dupes in a 2-D @list

2003-07-25 Thread Ovid
, replacing the duplicates with spaces gives us: 3 r s 8 a d 8 4 h w w a 4 9 Is that what you are looking for, or do things get shifted left or up, or some combination of that? Cheers, Ovid = Hire me! http://users.easystreet.com/ovid/personal/resume.html

RE: Getting the domain name

2003-07-17 Thread Ovid
could toss out that cause issues here. Cheers, Ovid = Hire me! http://users.easystreet.com/ovid/personal/resume.html Silence is Evilhttp://users.easystreet.com/ovid/philosophy/indexdecency.htm Ovid http://www.perlmonks.org/index.pl?node_id=17000

Re: help needed

2003-06-29 Thread Ovid
Anyone p[lease tell me from where can i download Net::FTP module Hi Uday, Net::FTP is part of libnet which you can download at http://search.cpan.org/author/GBARR/libnet-1.16/. Cheers, Ovid = Hire me! http://users.easystreet.com/ovid/personal/resume.html Ovid

Re: Why not Class Objects

2003-06-27 Thread Ovid
to be able to override this. Class::Data::Inheritable allows you to do that. Cheers, Ovid = Hire me! http://users.easystreet.com/ovid/personal/resume.html Ovid http://www.perlmonks.org/index.pl?node_id=17000 Web Programming with Perl http

Re: Premature end of script headers

2003-03-24 Thread Ovid
significantly different from the other one. Cheers, Ovid = Ovid on http://www.perlmonks.org/ Web Programming with Perl: http://users.easystreet.com/ovid/cgi_course/ Silence Is Evil: http://users.easystreet.com/ovid/philosophy/decency.txt __ Do you Yahoo

Re: Premature end of script headers

2003-03-24 Thread Ovid
; $FORM{$name} = $value; } Numerous bugs here. Rather than go through all of them, I'll just post a link to my course where I detail them: http://users.easystreet.com/ovid/cgi_course/lesson_two/lesson_two.html # where is the mail program? $mailprog = 'usr/lib/sendmail'; Without

Re: Using Print -strange behavior

2003-03-24 Thread Ovid
--- Jose Luis Martinez [EMAIL PROTECTED] wrote: Hello Ovid This is the code that I am trying to run #!/usr/bin/perl my $a=Hello World; print $a; There is nothing wrong with this code. Thoughts: * what is the result of 'which perl'? Are you pointing to the same interpreter

Re: directory help

2003-03-22 Thread Ovid
::Find' for more information. Cheers, Ovid = Ovid on http://www.perlmonks.org/ Web Programming with Perl: http://users.easystreet.com/ovid/cgi_course/ Silence Is Evil: http://users.easystreet.com/ovid/philosophy/decency.txt __ Do you Yahoo!? Yahoo

Re: image upload

2002-12-26 Thread Ovid
(:standard); my $fh = param('upload_form_name'); print while $fh; The documentation will give you far more detail on how to handle this. Cheers, Ovid = Ovid on http://www.perlmonks.org/ Web Programming with Perl: http://users.easystreet.com/ovid/cgi_course/ Silence Is Evil: http

Re: image upload

2002-12-26 Thread Ovid
should check out the CGI.pm documentation (http://users.easystreet.com/ovid/cgi_course/appendices/appendix3.html#creating%20a%20file%20upload%20field). 'cgi-lib.pl' has been deprecated for years. The following snippet should give you a start. If you are on a Windows system, you'll also want

Re: image upload

2002-12-26 Thread Ovid
--- Ovid [EMAIL PROTECTED] wrote: you are on a Windows system, you'll also want to see 'perldoc -f binmore' Erm, I meant 'perldoc -f binmode' :) Cheers, Ovid = Ovid on http://www.perlmonks.org/ Web Programming with Perl: http://users.easystreet.com/ovid/cgi_course/ Silence Is Evil: http

RE: Excel

2002-12-16 Thread Ovid
, Ovid = Ovid on http://www.perlmonks.org/ Web Programming with Perl: http://users.easystreet.com/ovid/cgi_course/ Silence Is Evil: http://users.easystreet.com/ovid/philosophy/decency.txt __ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable

Re: Getting a variable back

2002-12-16 Thread Ovid
digests that you can match against the downloaded code (that's not perfect, but it's better than nothing). Preferable, though, would be outlining the overall problem that you're trying to solve so we can perhaps brainstorm with you better methods of approaching this situation. Cheers, Ovid

Re: Guestbook script problem

2002-11-27 Thread Ovid
also use your CGI object for this: print $q-header; See my CGI course for more information on this (link at bottom of email). Good luck with your programming! Cheers, Ovid = Ovid on http://www.perlmonks.org/ Web Programming with Perl: http://users.easystreet.com/ovid/cgi_course/ Silence

Re: Guestbook script problem

2002-11-27 Thread Ovid
also use your CGI object for this: print $q-header; See my CGI course for more information on this (link at bottom of email). Good luck with your programming! Cheers, Ovid = Ovid on http://www.perlmonks.org/ Web Programming with Perl: http://users.easystreet.com/ovid/cgi_course/ Silence

Re: OOP

2002-11-26 Thread Ovid
whether or not you forgot to test your args. Cheers, Ovid = Ovid on http://www.perlmonks.org/ Web Programming with Perl: http://users.easystreet.com/ovid/cgi_course/ Silence Is Evil: http://users.easystreet.com/ovid/philosophy/decency.txt __ Do

Re: Re: tutorials

2002-11-25 Thread Ovid
incarnations of the site). Cheers, Ovid = Ovid on http://www.perlmonks.org/ Web Programming with Perl: http://users.easystreet.com/ovid/cgi_course/ Silence Is Evil: http://users.easystreet.com/ovid/philosophy/decency.txt __ Do you Yahoo!? Yahoo! Mail

Re: tutorials

2002-11-25 Thread Ovid
it without understanding the implications, but code like this should not be used except as an example of why it doesn't work. You can find more detail at lesson two of my CGI course: http://users.easystreet.com/ovid/cgi_course/lesson_two/lesson_two.html The rest of the course has many similar issues

Re: HTML::TokeParser/Parsing problem

2002-11-25 Thread Ovid
need to. The rest of the code should still work fine. Cheers, Ovid Cheers, Ovid = Ovid on http://www.perlmonks.org/ Web Programming with Perl: http://users.easystreet.com/ovid/cgi_course/ Silence Is Evil: http://users.easystreet.com/ovid/philosophy/decency.txt

Re: html in my script

2002-11-25 Thread Ovid
that is entered to ensure I don't have apparent whitespace at the end. It's not an optimal solution, but neither is using a browser as a GUI client. Cheers, Ovid = Ovid on http://www.perlmonks.org/ Web Programming with Perl: http://users.easystreet.com/ovid/cgi_course/ Silence Is Evil: http

Re: tutorials

2002-11-24 Thread Ovid
also check out http://users.easystreet.com/ovid/cgi_course I assume that you already know Perl and know *some* HTML, but that's about it. I think it's fairly easy to read and has gotten some good reviews. Let me know what you think. Cheers, Ovid = Ovid on http://www.perlmonks.org/ Web

Re: Determining when a file was created???

2002-11-20 Thread Ovid
the file was last altered or accessed. my ($last_read,$last_written) = (stat($filename))[8,9]; Cheers, Ovid = Ovid on http://www.perlmonks.org/ Web Programming with Perl: http://users.easystreet.com/ovid/cgi_course/ Silence Is Evil: http://users.easystreet.com/ovid/philosophy/decency.txt

Re: query string into hash?

2002-11-13 Thread Ovid
to update your code. Cheers, Ovid Cheers, Ovid = Ovid on http://www.perlmonks.org/ Web Programming with Perl: http://users.easystreet.com/ovid/cgi_course/ Silence Is Evil: http://users.easystreet.com/ovid/philosophy/decency.txt __ Do you Yahoo

Re: map EXPR, LIST

2002-11-12 Thread Ovid
the Data::Dumper output, and you can see that a list of ones has been created. The map only confused things. The code would be better written as: print qq{\t$_\n} foreach @{$HashofLists{$List}}; I hope that answered your question. Cheers, Ovid = Ovid on http://www.perlmonks.org/ Web

Re: How can I solve this error?

2002-11-10 Thread Ovid
help messages to CLPM, Perlmonks, or other resources in an effort to find a PPM. It would be much easier that way. Cheers, Ovid = Ovid on http://www.perlmonks.org/ Someone asked me how to count to 10 in Perl: push@A,$_ for reverse q.e...q.n.;for(@A){$_=unpack(q|c|,$_);@a=split//; shift

Re: perl/DBI error

2002-11-10 Thread Ovid
will always be reported so you don't have to worry as much about always checking the return value of all DBI calls. Cheers, Ovid = Ovid on http://www.perlmonks.org/ Someone asked me how to count to 10 in Perl: push@A,$_ for reverse q.e...q.n.;for(@A){$_=unpack(q|c|,$_);@a=split//; shift

Re: How can I solve this error?

2002-11-09 Thread Ovid
hope it won't be necessary to install a full C compiler. Teddy, Hate to break it to you, but cl.exe is the name of Microsoft's C/C++ compiler :) Cheers, Ovid = Ovid on http://www.perlmonks.org/ Someone asked me how to count to 10 in Perl: push@A,$_ for reverse q.e...q.n.;for(@A){$_=unpack(q

Re: How can I solve this error?

2002-11-09 Thread Ovid
Hmmm... I just answered a four day old email message, didn't I? :) Cheers, Ovid (who never did Y2K work because he obviously can't find a date) --- Ovid [EMAIL PROTECTED] wrote: --- Octavian Rasnita [EMAIL PROTECTED] wrote: Hi all, When trying to compile a module using the nmake program

Re: basename / path question

2002-11-09 Thread Ovid
reading? Hi Kris, What you're looking for is File::Basename. [ovid@ovid ovid]$ perl -MFile::Basename -le 'print basename(/usr/bin/perl)' perl [ovid@ovid ovid]$ perl -MFile::Basename -le 'print dirname(/usr/bin/perl)' /usr/bin Cheers, Ovid = Ovid on http://www.perlmonks.org

Re: Calculate PI

2002-11-04 Thread Ovid
; } If you want to see some fun implmentations, check out this thread on Perlmonks: http://www.perlmonks.org/index.pl?node_id=159377. One of my favorites: sub _{$---4/$_}print- _$-=1e5 Cheers, Ovid = Ovid on http://www.perlmonks.org/ Someone asked me how to count to 10 in Perl: push

Re: Reading from mulitple files

2002-11-04 Thread Ovid
* the three lines from the second file. It should be noted that this program doesn't tell you which file is which as you didn't necessarily specify that in your email. It should be fairly easy to add, though. Cheers, Ovid #!/usr/bin/perl -w use strict; use IO::File; use vars qw( @file_handle

Re: CGI.pm param question

2002-10-23 Thread Ovid
fields necessary to contain your form values. Here's a two-line demonstration: use CGI qw/:standard/; print hidden( $_ ) foreach param(); Save that as 'test.pl' and run it as follows: perl test.pl color=red color=green name=Ovid You should get output similar to the following (I've

Re: html regular expressions

2002-10-12 Thread Ovid
-return_text; } } The documentation provides plenty of additional examples. This module can be found on the CPAN. Cheers, Ovid = Ovid on http://www.perlmonks.org/ Someone asked me how to count to 10 in Perl: push@A,$_ for reverse q.e...q.n.;for(@A){$_=unpack(q|c|,$_);@a=split//; shift@a;shift

Re: Mystery number 1 in output

2002-10-10 Thread Ovid
print Ovid' That prints Ovid1 Cheers, Ovid = Ovid on http://www.perlmonks.org/ Someone asked me how to count to 10 in Perl: push@A,$_ for reverse q.e...q.n.;for(@A){$_=unpack(q|c|,$_);@a=split//; shift@a;shift@a if $a[$[]eq$[;$_=join q||,@a};print $_,$/for reverse

  1   2   >