Re: perl + ncurses turtorial ?

2006-07-06 Thread JupiterHost.Net
Gregory Machin wrote: Hi Hello, I'm looking for an perl ncuses tutorial so I can write a remote admin app to work via ssh .. Not really a tutorial but Curses::UI is what you will want to use HTH -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PR

Re: iterate over newlines

2006-07-06 Thread JupiterHost.Net
Ryan Moszynski wrote: i really hope thats overkill for my problem. I have my program finshed, this is the last condition i have to deal with. Also, my supervisor would prefer me not to use any nonstandard modules. Why not, if it on CPAN its "standard". If its not bundled with the perl you

Re: PATH env variable and open()

2006-07-26 Thread JupiterHost.Net
Travis Thornhill wrote: Does anyone have any idea why setting $ENV{"PATH"} = "" would cause Are you running setuid or in taint mode by chance? the open() function to fail? The file I'm trying to open exists, and some debug open(...) or die "open failed becaause: $!"; printing shows

Re: its DONE !! CGI Script to pass a file to different servers - code is here

2006-07-26 Thread JupiterHost.Net
I BioKid wrote: I made it !!! Thanks to my buddy Arshad - Buddy you're a true-perl-buddy !!! Here comes an easy way, not exactly the way I want it - but I can do it this way too, After all :*There's more than one day to do it in perl*:We used WWW::Mechanize module: A scrap version of the cod

Re: Other ways to assign a filehandle to a variable?

2006-07-27 Thread JupiterHost.Net
Use lexical ones in the first place. open my $fh, '<', $filename or die "open $filename, stopped" ; And if you're gogint to die you might as well say why :) ... or die "open $filename failed: $!" ; -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTE

Re: need to return exit code

2006-07-31 Thread JupiterHost.Net
Gregory Machin wrote: Hi Hello, My perl script is called by a bash script, used in a compile / build env. But the bash script is not seeing my script's exit and is timming out and continuing ... How can I pass a standard exit code 0 = success 1 = fail to the operating system / calling scri

Is this behavior not right?

2006-08-01 Thread JupiterHost.Net
I was surprised that strict and warnings didn;t hollor when I used a variable without my... $ perl -mstrict -wle '$gl="why am I not throwing errors?";print $gl;' why am I not throwing errors? $ What magic voodoo is going on here? I though you had to my $var w/ strict? -- To unsubscribe, e-mai

Re: BASEDIR and BASENAME on Windows

2006-08-01 Thread JupiterHost.Net
BenBart wrote: Hi all, Can anyone please tell me how to get the BASENAME and BASEDIR of a file ... i.e. for example, if I have C:\Windows\Temp\Dir1\MyFile.TXT, I want to be able to get the BASENAME which is MyFile and the BASEDIR which is C:\Windows\Temp\Dir1 and assign them to variables .

Re: Is this behavior not right?

2006-08-01 Thread JupiterHost.Net
Joshua Colson wrote: On Tue, 2006-08-01 at 11:38 -0500, JupiterHost.Net wrote: perl -mstrict -wle '$gl="why am I not throwing errors?";print $gl;' That should be a capitalized 'M': perl -Mstrict -wle '$gl="why am I not throwing errors?";pr

Re: math module and array manipulation

2006-08-14 Thread JupiterHost.Net
chen li wrote: Dear all, I have an array contains 12 numbers. I want to calculate the mean and standard deviation for very three numbers. I just wonder which math module is available to do the job. Wonder no longer :) Find out for sure: http://search.cpane.org/ -- To unsubscribe, e-mail:

Re: math module and array manipulation

2006-08-15 Thread JupiterHost.Net
I have an array contains 12 numbers. I want to calculate the mean and standard deviation for very three numbers. I just wonder which math module is available to do the job. Wonder no longer :) Find out for sure: http://search.cpane.org/ I think you meant http://search.cpan.org. :) Inde

Re: filecopy

2006-08-21 Thread JupiterHost.Net
Smith, Derek wrote: Why doesn't a copy work on each array element yet a glob does? I'm assuming you eman copy() from File::Copy? because copy()'s source doesn't do that I imagine. Is there documentation for copy() that seems to indicate it does? Is there a way to tell Perl to copy each e

@EXPORT_OK and AUTOLOAD

2006-08-21 Thread JupiterHost.Net
Say a module has 3 functions foo, bar, and baz and is able to autoload do_\w+. In @EXPORT_OK can you put soem commonly used AUTOLOADed methods and have them exported? our @EXPORT_OK = qw(foo bar baz do_this do_that); or is this not possible? -- To unsubscribe, e-mail: [EMAIL PROTECTED] For

Re: @EXPORT_OK and AUTOLOAD

2006-08-22 Thread JupiterHost.Net
JupiterHost.Net wrote: Say a module has 3 functions foo, bar, and baz and is able to autoload do_\w+. In @EXPORT_OK can you put soem commonly used AUTOLOADed methods and have them exported? our @EXPORT_OK = qw(foo bar baz do_this do_that); or is this not possible? I tried it this

SVN::Ra::Reporter Useage

2006-08-22 Thread JupiterHost.Net
Howdy, Being a C/XS newbie (but perl oldie) I want to use some of the SVN::Ra goodies but can't seem to get over a certain hump, any input is appreciated! Assuming $sra is an SVN::Ra object and I have valid numeric $start_rev and $end_rev a) what do I pass to $sra->do_diff() (not sure what

Re: smtp authentication

2006-08-26 Thread JupiterHost.Net
Alan Sanders wrote: Tom - Yes I use real values. Dr. Ruud - You're right... the extra line is useless and I have cleaned it up accordingly. Anyways I figured the script out. Here's the final output cleaned up a little bit. Thanks for your help. #!/usr/bin/perl -w use strict; use Net::SM

Re: Create HTML code with perl

2006-09-07 Thread JupiterHost.Net
Brian McKee wrote: On Monday 04 September 2006 00:34, Webmaster Adil wrote: Hi All I need print HTML codes with perl: If you want to HTMLify plain text, try Text::InHTML it even does syntax highlighting (if available) if the plain text is HTML, Perl, XML, and about 95 +/- other ones.

temporarily change a function, sort of like doing a local $var;

2006-09-12 Thread JupiterHost.Net
Howdy, I'm trying to change the behavior of a function (whose use of and call I have no control over) to avoid some nasty behavior in certain circumstances. Its easy enough to redefine it but after the hairy part is done I want to change it back. Similar to how you can: { local $var;

Re: temporarily change a function, sort of like doing a local $var;

2006-09-12 Thread JupiterHost.Net
What the statement does local *What::ever = \&my_sub; # with a named sub or local *What::ever = sub { }; # with a closure is to locally redefine the *What::ever{CODE} slot of the glob. Adriano, *you* are awesome! I've been fiddling with this sort of thing dancing around the right w

Re: transition to Perl developer

2006-09-19 Thread JupiterHost.Net
> Derek B. Smith wrote: Is there a Perl open source project currently underway wherein anyone can contribute by writing code for the projects completion such as Jbilling? Jbilling is an Derek, reread that. That question makes no sense, do you mean CPAN? Do you mean something that does what J

Re: transition to Perl developer

2006-09-19 Thread JupiterHost.Net
Derek B. Smith wrote: OK CPAN yes I know it is an open source project, but are there task assignments for specific tasks/projects as opposed to submitting a module? So you are looking for an open source project done in Perl that has a community todo list that you can contribute to or an ope

Re: transition to Perl developer

2006-09-20 Thread JupiterHost.Net
I'm not sure what Derek is looking for, either, but have a look at: * bestpractical.com/rt/ An open-source request/bug/job tracker, which is also used as part of the CPAN projcet: rt.cpan.org * www.cpanforum.com Open-source Perl project, linked from every page of CPAN, which has a good TOD

Re: Perl Inheritance(take-2)

2006-11-06 Thread JupiterHost.Net
Muttley Meen wrote: Hi! Hello, $a = Package1::new(); $a->Package2->Create(); # this should call IncErr too print "ERR1: $a->{err}\n"; # should print 1 doent't work as I expected. Is there something wrong with the way I `bless`-ed the class Package2 ? use strict, warnings, and most import

Re: Round to mult. of 5?

2006-11-08 Thread JupiterHost.Net
C.R. wrote: Does anyone have a routine that will round an integer to a multiple of 5? Didn't find anything on CPAN? Odd... A search for "Round" -> http://search.cpan.org/search?query=Round&mode=all Yeilded Math::Round, nearest() looks promising. For example: if number ends in 0 or 5, no rou

HTTP::Daemon 401 login prompt

2006-11-09 Thread JupiterHost.Net
Howdy, I'm trying to get an HTTP::Daemon to make the browser prompt with a basic authentication login box. With the example at: http://search.cpan.org/perldoc?HTTP::Daemon I just change $c->send_error(RC_FORBIDDEN) to $c->send_error(RC_UNAUTHORIZED) and I get a nice 401 Unauthorized HTML

goto return ?

2006-11-24 Thread JupiterHost.Net
Howdy list, I'm trying to figure this one out and am at the brick wall with trying /docs in a function I'd like to replace this kind of code: if($whatever) { ## do some stuff return @stuff; } # we got this far so keep on moving with do_some_stuff_and_return( @stuff ) if $whateve

Re: goto return ?

2006-11-24 Thread JupiterHost.Net
Tom Phoenix wrote: On 11/24/06, JupiterHost.Net <[EMAIL PROTECTED]> wrote: The trick is I can't seem to goto() return in do_some_stuff_and_return(), I'm sure since its so deep down... Are you saying that you want a subroutine that can make the subroutine that called *it*

Re: goto return ?

2006-11-27 Thread JupiterHost.Net
What about doing this? return if do_one_then_two($whatever); ... sub do_one_then_two { my $what = $_[0]; if ($what) { one(); two(); return 1; } return 0; } Thanks, I'm not looking for how to handle a condition necessarily. I want to be able to: log_e

Re: goto return ?

2006-11-27 Thread JupiterHost.Net
Just need to figure you how to get the functionality that: goto &CORE::return; feels like it should do assuming I knew how to reference return... nah Thanks for your examples, however if a change was needed you'd still have to change every instance instead of the single function. So I'd

Re: goto return ?

2006-11-28 Thread JupiterHost.Net
Thanks to everyone for their feedback, I understand how to do basic logic and control flow, what I'm really looking for is how to get goto &CORE::return; to work like it reads. log_error_and_return($error, @return) if $whatever; Close you want return log_and_go_home($error, @return) i

Re: goto return ?

2006-11-28 Thread JupiterHost.Net
So any ideas about how to get: goto &CORE::return; to work like it reads. The suggestions you were given do exactly what you ask for. Obviously, read 'goto &CORE::return()' differently from the rest of the list. So instead of complaining, why don't you explain how you read it, instead of sim

Re: goto return ?

2006-11-28 Thread JupiterHost.Net
Rob Coops wrote: Hang on I guess I understand what it is you are trying to do... You want: goto &CORE::return; to work like it reads. Now my question to you is how does this read to you because what I am reading in the perlsub about this stuff is the following. It reads this way: It "rea

Re: goto return ?

2006-12-04 Thread JupiterHost.Net
Bill Jones wrote: On 11/24/06, JupiterHost.Net <[EMAIL PROTECTED]> wrote: The trick is I can't seem to goto() return in do_some_stuff_and_return(), I'm sure since its so deep down... I guess I'm totally confused; I don't see how a goto can return back to the

Re: goto return ?

2006-12-05 Thread JupiterHost.Net
Thaks Jay, I'll soak it all up tomorrow first thing, I'm sleepy :) Good night all! Jay Savage wrote: On 12/3/06, Bill Jones <[EMAIL PROTECTED]> wrote: On 11/24/06, JupiterHost.Net <[EMAIL PROTECTED]> wrote: > The trick is I can't seem to goto() return in >

Re: return 1

2006-12-08 Thread JupiterHost.Net
Derek B. Smith wrote: Why is return 1 coded at the end of many programs. For example: I know it means true but what does this do and why? thank you derek #!/usr/bin/perl #use strict; my $user_name = qq(dsmithxx); my $user_password = qq(); my $sql_server = qq(x); my ($dbh,$drh,$stmt);

Re: Mail Attachment

2007-01-16 Thread JupiterHost.Net
Lawrence Statton XE2/N1GAK wrote: First -- your porgram is nowhere NEAR complete ... I see nowhere that $to_address, $from_address, etc are populated. Read the posting guidelines and try again. That being said, there are some glaring deficiencies that can be pointed out even without the compl

Re: Sending mail

2007-02-04 Thread JupiterHost.Net
Bill Jones wrote: On 1/24/07, M. Lewis <[EMAIL PROTECTED]> wrote: I've used MIME::Lite for the mail tasks I've had up till now and it has worked very well. Now I need to send mail via a different port than port 25, say port 587. As far as I can tell, MIME::Lite does not have this capability.

Re: sendmail

2007-02-21 Thread JupiterHost.Net
Jeff Pang wrote: I need to send mail to all users defined in one array. I tried foreach loop but what is happening is it is sending mail to only first user in the array. not sending mails to rest of the users. Is there any way to send a mail to all users in array in one shot. I am using send

Re: Perl Parsing

2007-02-21 Thread JupiterHost.Net
Sumit Shah wrote: Hello All, Heloo, I have a string like: 'a = 1; b = 2; c = 3; d = 4' Whats the best way to parse it so that I can get a value for c, which is 3? I have used the hash approach. But, I was wondering if there is a faster way to do it in Perl. Why do you say hashes are sl

Re: using open3 to interact with external program

2005-06-08 Thread JupiterHost.Net
Here is what I now have... use IPC::Open3; use strict; use warnings; before IPC::Open3 local(*HIS_IN, *HIS_OUT, *HIS_ERR); $childpid = open3(*HIS_IN, *HIS_OUT, *HIS_ERR, 'gpg --edit root'); Make sure open3 worked open3(...) or die $!; -- To unsubscribe, e-mail: [EMAIL PROTECTED] For a

Re: answering prompts using expect or perl

2005-07-08 Thread JupiterHost.Net
As people have recommended to you nearing close thousands of times :) search.cpan.org for "Expect" -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Syntax::HighLight::Universal install bug

2005-07-12 Thread JupiterHost.Net
I have the same problem as this bug report for Syntax::HighLight::Universal http://rt.cpan.org/NoAuth/Bug.html?id=13662 Any ideas about a fix/anyone else experience this? I've also tried the different compilers with the same results. Any input is appreciated! TIA :) -- To unsubscribe, e-mail

Access __END__ from module/package

2005-07-13 Thread JupiterHost.Net
Howdy all, In a script I can access __END__ via I'd like to access __END__ form within a module (IE package) Foo.pm package Foo; use strict; use warnings; sub dofoo { print ; } 1; __END__ hello world in script: #!/usr/bin/perl use strict; use warnings; use Foo; Foo::dofoo(); shoul

Re: Access __END__ from module/package

2005-07-13 Thread JupiterHost.Net
Jeff 'japhy' Pinyan wrote: On Jul 13, JupiterHost.Net said: In a script I can access __END__ via I'd like to access __END__ form within a module (IE package) Reading 'perldoc perldata' yields this: Text after __DATA__ but may be read via the filehandle &q

Re: using htpasswd from perl script

2005-07-20 Thread JupiterHost.Net
Graeme McLaren wrote: Afternoon all, I was thinking about writing a perl script which would add users to an .htaccess file. How would I invoke htpasswd from a perl script? I'm thinking I'll need to use the system command. system or backticks or qx() but you'd probably be better off with a

Re: using htpasswd from perl script

2005-07-20 Thread JupiterHost.Net
http://search.cpan.org/search?query=htaccess&mode=module Better yet, use mod_auth_mysql in your Apache and manage users, groups and passwords in a database table. This should be a bit more secure than giving your web user write access to a .htpasswd file. so you give your webuser** write acce

Re: using htpasswd from perl script

2005-07-21 Thread JupiterHost.Net
Graeme McLaren wrote: Guys, thank you for your replies! using .htaccess from the command line: bash-2.03# /usr/local/apache/bin/htpasswd /path/to/auth/file/auth_file username New password: Re-type new password: Adding password for user username How would I do this using that module? From

Re: Problems creating a simple variable

2005-07-21 Thread JupiterHost.Net
Dave Adams wrote: I want to create a variable, to be used for other stuff, using today's date. Can anyone help me with the second last line? sure :) my $currentdate = '20050721'; You don't explain what you are trying to get as most of us can't read your mind or have time to extrapolate fr

Re: scaning mail

2005-07-25 Thread JupiterHost.Net
#Get and process mail for my $messageID (1 .. $numofmail){ my $MFH = $pop3server->getfh($messageID); my $text = ''; Indent those two :) $text .= $_ while <$MFH>; my ($price) = $text =~ m/Price\:(.*)/; } #Exit exit(); Why do you call exit here? -- To unsubscribe, e-mail: [EMAI

Re: login shell?

2005-07-27 Thread JupiterHost.Net
Bryan R Harris wrote: Is there a way to determine in perl whether the current script was run from a login shell or not? if(-t STDIN) { print "Hello terminal\n"; } else { print "Content-type: text/html\n\n"; print "Hello Browser\n"; } HTH :) -- To unsubscribe, e-mail: [EMAIL PROTEC

Re: Messenger

2005-07-27 Thread JupiterHost.Net
Octavian Rasnita wrote: Hi, Does anyone know a perl module that can be used for creating a Messenger client that really works? I have tried Net::YahooMessenger but it doesn't work. Have you searched cpan for the messenger you want to use? -- To unsubscribe, e-mail: [EMAIL PROTECTED] For a

Re: ref / hash

2005-08-02 Thread JupiterHost.Net
Brent Clark wrote: Hi all I my thanks to all whom have tried to help me earlier, but alas, I still cant seem to get this right. I know this gonna kick me because it will be a stupid small mistake. my ($ref_hash, $fileName) = @_; foreach my $roomCode ( keys %{ $ref_hash->{$

Re: "$#{$array} "

2005-08-17 Thread JupiterHost.Net
Hi, Hello, I don't not understand how the $#{$array_r} returns "highest" element as 4 and not 5??? Because array elements are indexed starting at 0 not 1 and $#array returns the element nuumber not its value. See example below: #!/usr/bin/perl use warnings; use strict; my @array = (1,2,3

Re: not using strict problems

2005-08-19 Thread JupiterHost.Net
I have a problem whereby another new programmer (like myself) likes NOT to use strict in his code where by I do. My own anecdote: I didn't think that using the 'strict' or 'warnings' pragmas was important either, once. And I'm a very novice programmer. However, when I thought about, I alw

use Module VERSION; ignoring version???

2005-08-25 Thread JupiterHost.Net
How come "use MODULE VERSION;" works sometimes and not others? In this case: $ perl -mstrict -we 'use CGI 3.12;print "$CGI::VERSION\n";' CGI version 3.12 required--this is only version 3.11 at -e line 1. BEGIN failed--compilation aborted at -e line 1. $ perl -mstrict -we 'use File::Copy::Recursi

Re: use Module VERSION; ignoring version???

2005-08-26 Thread JupiterHost.Net
You'll see that the author of this module has incorrectly implemented the VERSION method as: sub VERSION { $VERSION } From perldoc UNIVERSAL: "VERSION ( [ REQUIRE ] )" "VERSION" will return the value of the variable $VERSION in the package the object is blessed in

Re: Directories into arrays, again.

2005-08-26 Thread JupiterHost.Net
Daniel Kurtz wrote: Sorry, obviously the code is supposed to read: Actually it should read: use strict; use warnings; opendir( DIR1, "."); opendir DIR1, '.' or die "Could not open .: $!"; @before = readdir(DIR1); my @before = readdir DIR1; closedir(DIR1); # Execute a command that

Re: Directories into arrays, again.

2005-08-26 Thread JupiterHost.Net
Then that would be the code to show :) although I bet strict/warnings/and checking your open's (or die $!;) will show you what is wrong :) <<< I see, however that is still the best practice to be in, especially when asking for assistance since it catches 99.9% of little issues. No, the .

Re: Dot and Dubble Dot directory names

2005-08-26 Thread JupiterHost.Net
es when fed $name values of '.' and '..' ? Without having to chdir to these directories, that is. perldoc -f File::Spec HTH :) Lee.M - JupiterHost.Net -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>

Re: encrypt the password stored in a file

2005-08-29 Thread JupiterHost.Net
Ken Perl wrote: The password used to access a ftp server is stored in a text file, the perl program gets the password from the file, the pass it to the ftp server for logon, this is the background. The requirement is encrypt the password store in a more secure way, and the perl program could st

Re: encrypt the password stored in a file

2005-08-29 Thread JupiterHost.Net
Maybe the protocol is SFTP and the transmission is secure... *transmission* maybe not source code, which is the OP's issue... By the way, isn't there a perl module that can crypt a string using a password (which can be used to decrypt it back)? Yes but then you have to store the cypher or

Re: encrypt the password stored in a file

2005-08-30 Thread JupiterHost.Net
Ken Perl wrote: In fact, I are just writing a demo program used in a presentation, when I open its config file through screen sharing, I don't want the visiter see the plain text password. Why didn't you say so? my $password = 'in_the_real_world_your_password_would_go_here_protected_from_p

Re: Escaping with tr

2005-08-30 Thread JupiterHost.Net
g multiple program when unnecessary (do you also where mits over your gloves which are themselves over liners???) :) perl -pi -e 's/\"//g;' my.csv There are other options you can specify to make the orig and edited file different as well, but I'll leave that as an excersize for

Re: Need help... packages

2005-09-02 Thread JupiterHost.Net
Luinrandir wrote: OK.. maybe I'm trying to be too fancy. use tsruic the package is: ### package Names; @Countries("Ireland","Wales"); Don;t double quote string that have nothing being interpolated, use single quotes or q() %Lord{Ireland}=("Bob","Tom"); $Lord{Ireland}

Re: UNIVERSAL class like functionality for non-OO?

2005-09-04 Thread JupiterHost.Net
Peter Rabbitson wrote: Hello list, Is there a clean and elegant way to make a subroutine available to all namespaces/packages? Something like the UNIVERSAL class for objects, but for non-OO environment. I need to embed a logging facility into a multimodule project, so I want to have a certai

Re: Sort Contents of an Array

2005-09-06 Thread JupiterHost.Net
Chico wrote: I want to query three different databases and put all the data into an array (which works fine). Next I want to convert the timestamps in the array to epochtime (Unix Time), then sort the array, and then convert back to original time stamp. Can anyone help? GET the EPOCH time f

Re: compiling Storable in order to use Proc::ProcessTable

2005-09-29 Thread JupiterHost.Net
[EMAIL PROTECTED] wrote: As I am attempting to compile this module I am getting many errors on an "this module" as in Storable or Proc::ProcessTable ?? perl -MCPAN -e 'install Storable;' # your perl doesn't already have Storable??? perl -MCPAN -e 'install Proc::ProcessTable;' Are you ins

Re: New Website for Perl Beginners: perlmeme.org

2005-10-03 Thread JupiterHost.Net
Gavin Henry wrote: Randal L. Schwartz said the following on 02/10/05 13:17: "Shlomi" == Shlomi Fish <[EMAIL PROTECTED]> writes: Shlomi> Hi good people, Shlomi> there's a new web-site for Perl beginners - perlmeme.org - Shlomi> http://perlmeme.org/ Unless it's hidden, I'm not finding an

sort with special order

2005-10-03 Thread JupiterHost.Net
Howdy List :) I have a list of strings that start with an uppercase B, Q, or Z I need to sort them so they are in order of Q, B , then Z my @sample_strings = qw(Bang Quiet Zing Zop Quid Boo); I need them to be sorted as: Quid Quiet Bang Boo Zing Zop I'd like to sort() them but can't f

Re: sort with special order

2005-10-03 Thread JupiterHost.Net
On Oct 3, JupiterHost.Net said: I have a list of strings that start with an uppercase B, Q, or Z I need to sort them so they are in order of Q, B , then Z Any ideas or input on how to efficiently do that with sort() or even map() is most appreciated :) perldoc -f sort|-f map didn't appe

Re: How to put html file's content into mail body and email it?

2005-10-04 Thread JupiterHost.Net
Franklin wrote: Hi; Hello, I have written a small email program which sends a simple email body which is "Test Text" and an attachment file whose name is test.htm. But I don't know how I can put the content of test.htm directly into the email's body and send it instead send the file via att

Re: what does "allowed rcpthosts" mean

2005-10-05 Thread JupiterHost.Net
Franklin wrote: Hi; I have written a small email program which sent a simple email using Mail::Sendmail. But when I executed it, it failed and the output was: the domain isn't in the list of allowed rcpthosts. Would you please tell me what it means and how to solve it? It probably means you

Re: Matchin 2 strings

2005-10-18 Thread JupiterHost.Net
K.Moeng wrote: hello. Hello, Here is my problem. i am unable to return the 2 strings as true. you're not returning anything anywhere... it false back to the else statement. have you tried printing $msg to see what it contains to manually verify it matches what you think it matches?

Re: white space between roam and act

2005-10-19 Thread JupiterHost.Net
K.Moeng wrote: Hello again, Hello, Please turn of read receipts when posting to a list, thanks. I have rephrased my question from yesterday, And are still not using strict or warnings, shame shame... I want to be able to ignore the white space in between ROAM and ACT By "the white sp

Re: help slurping a file

2005-10-28 Thread JupiterHost.Net
Hello, My question is, why can't I slurp in the entire file? Because you're fiddling with things that ought not be fiddled with ;p (IE $\) instead: use File::Slurp; my @lines = read_file($file); or you can use Perl 6's slurp() via a Perl6 module (perl6::Slurp maybe ???) see cpan for det

Re: help slurping a file

2005-10-28 Thread JupiterHost.Net
Xavier Noria wrote: use File::Slurp; my @lines = read_file($file); Wrong, that code assumes $file has the runtime platform conventions, which is not the case. OK sorry, sheesh... missed the part about it being a screwy file. Can you change the crewy line ending to a normal one then us

Re: How to change the Owner of a file

2005-10-31 Thread JupiterHost.Net
[EMAIL PROTECTED] wrote: Hi folks Hello, Can any body tell me how to change the owner of a file ?? I have written this script ... unless (chown $uid , $gid , $filename) { die "chown failed :$!"; } chown $uid, $gid, $filename or die "chown failed: $!"; this code will give me th

conditional use()

2005-11-04 Thread JupiterHost.Net
Howdy Perl Studs I'm beating my head against the wall trying to remember where I saw this / how to do this: In some documentation I remember seeing a use statement that had some sort of condition. Its the same idea as how: use Foo if $WE_DO_WANT_FOO; reads (but of course that doesn't wor

Re: conditional use()

2005-11-04 Thread JupiterHost.Net
Jeff 'japhy' Pinyan wrote: On Nov 4, JupiterHost.Net said: I'm beating my head against the wall trying to remember where I saw this / how to do this: In some documentation I remember seeing a use statement that had some sort of condition. use if ...; perldoc if Y

Re: How do i create a basic form that can be emailed to a database?

2005-11-04 Thread JupiterHost.Net
Misty Kesler wrote: I Just would like to know a lot of those already made forms, just don't work. Any help is appreciated I'd say just take the form (use CGI) and put it in a database (use DBI) instead of emailing (use Mail::Sender) it to and address that is setup to pipe it to a scri

Re: See the structure of what I am pulling via DBI

2005-11-07 Thread JupiterHost.Net
Robert Hicks wrote: If I am pulling data out with a $sth->fetchrow_arrayref, how do I see the structure of what is coming back? I need to change the description on some use Data::Dumper; print Dumper $sth->fetchrow_arrayref(.. of the data coming back out (like changing a "C" to "Close

Re: about creating a file in directory

2005-11-07 Thread JupiterHost.Net
ZHAO, BING wrote: Hi, Hello, It seems pretty easy to unlink a file from a directory, but wherever describes unlinking file has no counterpart on create a file. I did perldoc -q file: got what seemed to be what I need, then tested my program, no good: open

Re: PS what is the correct/efficient function to create a file

2005-11-08 Thread JupiterHost.Net
ZHAO, BING wrote: Hi, unlink $file works fine, but link $file doesn't even exist, Did you search seacrh.cpan.org for "link"? How about "touch"? if you had you'd have found this right off: http://search.cpan.org/~nwetters/File-Touch-0.01/Touch.pm Also perldoc -f open op

Re: printflush function question

2005-11-08 Thread JupiterHost.Net
heena s wrote: hi, Hello, this is one line in the subroutine: &printflush ("TRACEFILE","$message \n"); and i am getting this error time for a new script that doesn't use old deprecated style code... printflush('TRACEFILE', "$message\n"); or even printflush 'TRACEFILE', "$message\n";

Re: What am I doing wrong?

2005-11-08 Thread JupiterHost.Net
jean wrote: Hello all, Hello, based on your comments I've changed the script and it's working fine. Thanks for all the input. The double print was produced by: foreach (my @result = $sth->fetchrow_array) { I've changed this into: my @result=$sth->fetchrow_array; fo

Re:

2005-11-12 Thread JupiterHost.Net
Riano alejo wrote: Anybody know a good emaillist for PHP BEGINERS??? Sure: [EMAIL PROTECTED] Seriously though, if you're a beginner, learn *any* language but PHP and anything Microsoft specific. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECT

Re:

2005-11-14 Thread JupiterHost.Net
[EMAIL PROTECTED] Seriously though, if you're a beginner, learn *any* language but PHP and anything Microsoft specific. Hi Out of interest, why would you say this. You've never had to admin a web server where people used PHP huh? People are always getting PHP hacked, to upload files, wor

Re:

2005-11-14 Thread JupiterHost.Net
[EMAIL PROTECTED] Seriously though, if you're a beginner, learn *any* language but PHP and anything Microsoft specific. Hi Out of interest, why would you say this. You got any links to support your statement, I googled and I have not seen anything than the usual, and googling for perl expl

Re: about email sender

2005-11-15 Thread JupiterHost.Net
use Mail::Sender its awesome :) ZHAO, BING wrote: Hi, all: I have tried to read the email::sender module on CPAN, but it is far beyond my ablilty to understand it. And the synopsis gave me big headache too. But I just feel it should be no more than 5/6 lines to : 1.

Re: cookies

2005-11-16 Thread JupiterHost.Net
Hello, # animal is an existing cookie with value as 'lion' my $animal = cookie('animal'); # now $animal gets 'lion' # now assign 'tiger' to animal my $cookiereplace = "Set-Cookie: animal = tiger;\n"; print $cookiereplace # assignment done my $animal_new = cookie('animal');

Re:

2005-11-18 Thread JupiterHost.Net
JupiterHost.Net wrote: Riano alejo wrote: Anybody know a good emaillist for PHP BEGINERS??? Sure: [EMAIL PROTECTED] Seriously though, if you're a beginner, learn *any* language but PHP and anything Microsoft specific. And to add to that wonderful address I sent before:

Re:

2005-11-18 Thread JupiterHost.Net
Rob Coops wrote: Then again PHP above all others is seen as the most likely language to replace JAVA as a cross-platform language. At the expense of having to admin a bulky huge bloat of a fiend just like JAVA. *And* its lightyears away from having the capabilities of JAVA. I think the one

Re: anyway to determine # rows before fetch loop ends and without seperate count(*)

2005-11-18 Thread JupiterHost.Net
[EMAIL PROTECTED] wrote: which ultimately makes the 50 or 60 line script you sent originally about 10 lines or less. (IE by using the array of array setup instead of some convoluted matrix that is structured god know how. That means in six months when you (or heaven forbid me) have to m

Re:

2005-11-19 Thread JupiterHost.Net
Dr.Ruud wrote: Octavian Rasnita: Most of what you wrote was not so far fetched, but these: Most was understated I think :) PHP is shiny bloated freak that appeals to graphically inclined people because most PHP developers put a lot of effort into their HTML so that it looks really sharp (

Re:

2005-11-20 Thread JupiterHost.Net
PHP has very few templating systems and they just kill php's biggest advantage [...] There are plenty of PHP templating systems, and coding PHP gets a lot more pleasant with a good template system. I think what he meant was, most PHP "template" systems are simply drop in php scripts that ar

Re:

2005-11-21 Thread JupiterHost.Net
PHP has very few templating systems and they just kill php's biggest advantage [...] ... Oh gotcha :) Sure PHP has API's to template systms done in other languages and probably some doenn all in PHP, Perl has those too, but using them doesn't destroy the entire reason you'd want to use it in t

Re: number of spaces in a given sentence using regular expression.

2005-11-22 Thread JupiterHost.Net
[EMAIL PROTECTED] wrote: SET A 1. Write a perl script to find the number of spaces in a given sentence using regular expression. 2. Write a perl script to take name from command line argument and print the inputted name in both lower case and upper case. (use functions) 3.

Re: download a protein sequence from the web using LWP module

2005-11-22 Thread JupiterHost.Net
Please stop double posting your homework requests. [EMAIL PROTECTED] wrote: SET A 1. Write a perl script to find the number of spaces in a given sentence using regular expression. 2. Write a perl script to take name from command line argument and print the inputted name in both l

Re:

2005-11-24 Thread JupiterHost.Net
Dr.Ruud wrote: JupiterHost.Net: Templates are good and the poitn is: PHP's main "advantage" is embedded PHP/HTML + using a template systems make the embedded garbage useless = PHP is useless :) I still can't follow you. Use the templates for the parts of your system

Re:

2005-11-25 Thread JupiterHost.Net
Dr.Ruud wrote: JupiterHost.Net: Dr.Ruud: I don't mind using PHP for many parts of a website. For example I like pear/Image_Graph, see http://pear.php.net/package/Image_Graph and http://pear.veggerby.dk/samples/ If you know a similar Perl module, please let me know. Sure, search

<    1   2   3   4   5   6   7   8   >