Re: What is best way for learn programming?

2024-09-06 Thread Jeff Pang
/mastering-perl-2nd/9781449364946). These three are really nice books. I also like them. I also read this book (free PDF online): https://onyxneon.com/downloads/modern_perl_ebook.pdf -- regards, Jeff Pang -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail

Re: What is best way for learn programming?

2024-08-04 Thread Jeff Pang via beginners
l'. Isn’t the book Programming Perl by Larry? -- regards, Jeff Pang -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/

Re: What is best way for learn programming?

2024-07-31 Thread Jeff Pang via beginners
slow. -- With kindest regards, William. ⢀⣴⠾⠻⢶⣦⠀ ⣾⠁⢠⠒⠀⣿⡁ Debian - The universal operating system ⢿⡄⠘⠷⠚⠋⠀ https://www.debian.org ⠈⠳⣄ -- regards, Jeff Pang -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/

Re: Can use Perl and C in a program?

2024-07-26 Thread Jeff Pang via beginners
On 2024-07-27 01:11, William Torrez Corea wrote: How can I implement these two languages of programming in a program? You want to check the following library. https://metacpan.org/dist/Inline-C/view/lib/Inline/C.pod -- regards, Jeff Pang -- To unsubscribe, e-mail: beginners-unsubscr

close dbh in the subroutine

2014-05-08 Thread Jeff Pang
Hi, I created a $dbh object in the main body, and pass it to a subroutine, then close the $dbh in the subroutine, does it  influence the $dbh in the main? $dbh = DBI->connect($data_source, $username, $auth, \%attr); my_func($dbh); $dbh->do(something); # will this broke? sub my_func { my $d

Re: Mail::Sender with SSL

2012-08-07 Thread Jeff Pang
Also avoid the MIME::Lite suggestion posted, as that module is deprecated and not recommended for new code due to the vagaries and odd bugs in it--also due to the fact that it's not actively maintained or developed any more and just receives an occasional bug fix. what's the better module to h

Re: system command not working in different versions

2012-08-07 Thread Jeff Pang
You might want to tell us what's the output for error. Some reasons include the file path, the permissions etc. I am developing a script in which I need to call another perl script. In one linux machine it is working and in the other machine it is not working. Ex:- system("./submit_now.pl $xx

Re: Mail::Sender with SSL

2012-08-07 Thread Jeff Pang
I have succeeded in sending mail to my SMTP server with Mail::Sender without SSL. But now I'm wondering how to do that with SSL, for example, GMail. After reading the doc, I set TLS_required to 1 when I'm calling Mail::Sender->new, but nohing works. I tried to debug the program but found nothing

Re: Test Mail

2012-08-03 Thread Jeff Pang
congratulation, you have got it~ Fri, 3 Aug 2012 14:02:25 +0530 от Anitha Sreejith Victor : I want to subscribe to this perl forum thanks, Anitha -- Jeff Pang jeffp...@mail.ru

Thrift with Perl

2011-11-27 Thread Jeff Pang
Hi, Is there the good document or samples for running Thrift clients with Perl? The document on CPAN is too less. Thanks. -- Jeff Pang jeffp...@mail.ru

Re: best AJAX tool/module ?

2011-09-28 Thread Jeff Pang
ing else out there... >   > are there any other modules which would be easy (natural fit) to work with > data returned in JASON? >   > please give your expert advice based on your insight into this. >   >   > thank you. > -- Jeff Pang jeffp...@mail.ru

Re: Maintain Packages

2011-09-20 Thread Jeff Pang
nce. > use a module like this: http://search.cpan.org/~xsawyerx/Module-Starter-1.58/lib/Module/Starter.pm it will do all the stuff for you. -- Jeff Pang jeffp...@mail.ru

Perl on Android

2011-09-15 Thread Jeff Pang
Has anyone used this perldroid, and how does it behave? http://code.google.com/p/perldroid/ Thanks. -- Jeff Pang jeffp...@mail.ru

Re[2]: running perl script from inside another script & collecting output in array

2011-09-14 Thread Jeff Pang
lled script as a module, then use or require this module in main script and call the methods in the module. -- Jeff Pang jeffp...@mail.ru

Re: error print on closed file handle

2011-09-14 Thread Jeff Pang
ot;@allrecords"; > close OUT_FH; >   You should always be able to add a "or die" for capturing exceptions. open FH,">",$outfile or die $!; print FH @sth; close FH or die $!; -- Jeff Pang jeffp...@mail.ru

Re: Net::SMTP envelop from query

2011-09-13 Thread Jeff Pang
354 End data with . from: to: subject:a test message in the SMTP session above, the "mail from:" is the real sender ID, the "from:" in the data section is the header ID. -- Jeff Pang jeffp...@mail.ru

Re: Good resources on CGI programming with Perl

2011-09-08 Thread Jeff Pang
book from there: http://perltraining.com.au/notes/perlcgi.pdf -- Jeff Pang jeffp...@mail.ru

Re: unsusbcribe

2011-09-08 Thread Jeff Pang
please send an empty message to beginners-unsubscr...@perl.org rather than sending it to the list. 08 сентября 2011, 14:32 от ganesh vignesh : > > > -- Jeff Pang jeffp...@mail.ru

Re: tr/// and unicode

2011-09-08 Thread Jeff Pang
/"ae","oe"/; print $_."\n";' > > expected result: aeoe > actual result: aeae > > why? > > thx > matthias > > -- > To unsubscribe, e-mail: beginners-unsubscr...@perl.org > For additional commands, e-mail: beginners-h...@perl.org > http://learn.perl.org/ > > -- Jeff Pang jeffp...@mail.ru

Re: Moose

2011-09-07 Thread Jeff Pang
guide for Moose: http://www.modernperlbooks.com/mt/index.html -- Jeff Pang jeffp...@mail.ru

Re: [OT] Good Perl ISP's

2011-05-10 Thread Jeff Pang
using two VPS, one is Linode, another is namecheap's. Or try Amoson AMS for a year free. -- Jeff Pang www.DNSbed.com -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/

Re: Perl function for password encryption and decryption

2011-05-06 Thread Jeff Pang
eExcel.pm -- Jeff Pang www.DNSbed.com -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/

Re: Perl function for password encryption and decryption

2011-05-06 Thread Jeff Pang
h md5 or similar and store them to a database. When user input their username and password from the web from to login, we re-encrypt the password and compare it to the database. The encryption function could be md5: use Digest::MD5 'md5_hex'; my $crypt = md5_hex($password); -- Je

Re: Need help in fetching file from a folder in server and display.

2011-05-06 Thread Jeff Pang
equest them from the browser. -- Jeff Pang www.DNSbed.com -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/

Re: Open existing HTML page from perl script

2011-05-05 Thread Jeff Pang
$q = CGI->new; my $page = $q->param("page_number"); print $q->redirect("/$page.html"); -- Jeff Pang www.DNSbed.com -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/

Re: Help regular expression - string paring

2011-05-05 Thread Jeff Pang
I am interested is the the 21st and 22nd byte value. In the above > examples, they are both 05. > This could work: while() { my ($mat) = /^.{20}(.{2})/; print $mat,"\n"; } -- Jeff Pang www.DNSbed.com -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additiona

Re: [OFF] OSS Perl Shopping Carts

2011-04-28 Thread Jeff Pang
2011/4/29 : >        Are there any current open source Perl shopping carts out there?  The > only carts I've been able to find are either ancient or are written in PHP. > I don't know there is such one. You may post to mod_perl and Perl CGI mailing lists to get more info. Regards. -- To unsubs

Re: Naming subroutines WAS: special method name start with "_"

2011-04-28 Thread Jeff Pang
2011/4/28 Tim Lewis : > What is considered to be the proper way of naming internal subroutines? > > Example: > my_special_subroutine or mySpecialSubroutine > neither. But it could be: _my_special_subroutine -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail

Re: special method name start with "_"

2011-04-27 Thread Jeff Pang
2011/4/28 N : > Remove me from the mailing list please > please send an empty mail to: beginners-unsubscr...@perl.org -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/

Re: special method name start with "_"

2011-04-27 Thread Jeff Pang
2011/4/28 Uri Guttman : > > the _ prefix is the only common way to mark a private OR protected > method as perl doesn't directly provide any support for it. moose and > other OO systems may support this. I may think Perl OO (not moose) doesn't have private or protected methods as other languages

Re: How does this work?

2011-04-27 Thread Jeff Pang
2011/4/27 Tim Lewis : > If needed, there is a good complete table of the ASCII values at > http://www.asciitable.com/ > Good resource. BTW, what do "Hx" and "Oct" in the table mean? And what's the difference between them? Regards. -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For ad

Re: special method name start with "_"

2011-04-27 Thread Jeff Pang
2011/4/28 heyi xiao : > Hello all, > In the source code of some bioperl modules, I saw method names start with > "_". For instance, _print, in the following lines: > $self->_print($buff); > $self->_print("\n"); > These generally mean internal methods, but you could also call them from external pa

Re: Regular expression help !!

2011-04-27 Thread Jeff Pang
2011/4/27 jet speed : > Hi, > > Please could you advice, how can i write a regular expression for the > line below to capture 0079 and 69729260057253303030373 > > > 0079 Not Visible             69729260057253303030373 > This might help? $ perl -le ' $str="0079 Not Visible

Re: Alternatives to eval

2011-04-25 Thread Jeff Pang
2011/4/26 : > > > $s = "$x = 23"; > eval $s; > > eval a string is considered a bad way. You may store and read the variables to and from a pure Perl data structure storage, like Tie::Hash. Regards. -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: begi

Re: Make Perl program released on windows

2011-04-07 Thread Jeff Pang
2011/4/8 Jeff Pang : > I don't like to put some info like below in the README file. > "You should install Perl Interpreter (for example, ActivePerl) on the system." > I mean many users don't know how to install the ActivePerl on their operation systems. They even don

Make Perl program released on windows

2011-04-07 Thread Jeff Pang
Hello, It's easy to write a program with Perl for dynamic DNS client on Windows. How to make this program as a standard product edition for Windows? I don't like to put some info like below in the README file. "You should install Perl Interpreter (for example, ActivePerl) on the system." Thanks.

Re: regular expression for special html characters

2011-02-03 Thread Jeff Pang
2011/2/2 Shlomit Afgin : > > > Hello, > > I tried to convert html special characters to their real character. > For example, converting    ”      to     "   . > > I had the string > $str = "“ test ” ניסיון "; > The string contain also Hebrew letters. > Could Encode work on it? use Encode; $new =

what's the advantage of ORM?

2011-01-10 Thread Jeff Pang
I saw many companies require the employees to use DBIx::Class for work. I know this is a ORM system for database with Perl. What's the advantage of using ORM? Regards. -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.

Re: advangtes of Perl on various languages

2011-01-07 Thread Jeff Pang
2011/1/6 Raymond Wan : > > > Brandon again (sorry, maybe should have written two replies) -- I was > going to avoid this thread but while working today, I was reading > another program's documentation and they gave a script to run their > program in Python.  That's when I realized that the recent p

Re: Perl for windows Problem

2011-01-06 Thread Jeff Pang
> > That's  to say , is there some methods that I can use to write some perl > scripts on Linux Server > to check the Windows Server  System information ( CPU load , Memory and so > on )? > Net::SNMP is your friend. -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands

Re: perl training material and excercises for freshers

2011-01-03 Thread Jeff Pang
>            I am planning to give Perl training to my juniors in my > team. They are new to Perl. Could anyone please send me any Perl > training materials with exercises, or links, which I can refer to? > Sure. There are some really good PPTs about perl training made by a teacher Paul which was

Re: [OT] The Happy, Happy, Feel Good Thread (WAS: New Document: "How to Start Contributing to or Using Open Source Software")

2010-12-31 Thread jeff pang
2011/1/1 Shawn H Corey : > > Top posts don't bother me as much as those who don't trim the quotes. Other > problems: > Another problem: Shawn your signature message is too long to read. :) Regards. -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: begi

Re: [OT] New Document: "How to Start Contributing to or Using Open Source Software"

2010-12-31 Thread jeff pang
2010/12/31 Raymond Wan : > > If we leave it to just the people who "contribute and help", then it's > no longer a list for beginners.  It's for the contributors to post > among themselves. > Right. Anyway Happy New Year all Perl gurus and beginners! Regards. -- To unsubscribe, e-mail: beginners

Re: [OT] New Document: "How to Start Contributing to or Using Open Source Software"

2010-12-29 Thread jeff pang
2010/12/29 Erez Schatz : > Since most of your posts are related to directing people to your site, > I'd say we are about even. In more tightly-moderated lists you'd be > banned for spamming. I agree with this point. Directing everyone to a personal site is always considered rude. Regards. -- T

Re: Perl Books

2010-12-28 Thread jeff pang
2010/12/29 Andrew Migliazzo : > I am a UNIX system administrator and I want to use Perl because it's > standard since Solaris 8. Honestly I do not care much about MS Windows > programing or CGIs, I am looking for tasks automation or sockets > management. > * Automating System Administration with P

Re: Accessing file system from CGI

2010-11-19 Thread Jeff Pang
You may make the filesystem readable to httpd's running user like nobody. Perl has no way doing something more effective. 2010/11/18 Mike Martin : > Has anyone got any approaches that enable cgi scripts to access the > host filesystem (readonly) > > I am working on a doc viewer app (intended for

Re: Perl vs CGI

2010-11-15 Thread Jeff Pang
2010/11/16 Saurabh Bhatnagar : > Hello, > This is my first post. > > I have perl code to strip the root folder in a path. > ($shortpath = $fullpath) =~ s|/[^/]+||; > You may want to try: File::Basename -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: b

Re: About the perl $_ problem

2010-11-03 Thread Jeff Pang
于 2010-11-3 16:00, sync 写道: Hi, all : The followings are the two perl scripts: The first is printing the line before current line. the second is printing the current line. -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http

Re: anonymous hash reference

2010-10-31 Thread Jeff Pang
于 2010-10-31 21:43, Thorsten Scherf 写道: Hi, I have an array with anonymous hash references like the following: $foo = [ { name = value, id = value, }, { name = value, id = value, } ]; Iterating through the hash references works with: foreach $item (@$foo) { do something with $item->name; }

Re: How to get the Pause ID

2010-09-29 Thread Jeff Pang
2010/9/30 Parag Kalra : > Hi All, > > I have been trying to get Pause ID but seems like either the request is > getting rejected or something is wrong in the way I am raising the request. > Please send the message to the CPAN related mailing lists. http://lists.perl.org/all.html -- To unsubscrib

Re: How do I recognize request from a mobile phone

2010-09-28 Thread Jeff Pang
2010/9/28 Ramprasad Prasad > > But which perl module do I use for recognizing the UA. > > I use Mobile::UserAgent  , but what if there is a new Mobile in the market. > Will the useragent also be recognized > > This is decided by the client which sends the requests. If the request sent by client

Re: IO::Socket operations

2010-09-28 Thread Jeff Pang
2010/9/28 Anand Parthiban : > my $new_sock = $sock->accept(); > while(<$new_sock>) { > print $_; > } > close($sock); > ### > -- Put them in a forever loop, like: while(1) { my $conn = $sock->accept(); print <$conn>; } etc. You may want to buy the book

Re: How do I recognize request from a mobile phone

2010-09-28 Thread Jeff Pang
You can differ the requests by user-agent. http://en.wikipedia.org/wiki/User_agent 2010/9/28 Ramprasad Prasad : > I need to display  WAP version of pages  when accessed from mobile, else WEB > version > > What is the best of doing this > > -- To unsubscribe, e-mail: beginners-unsubscr...@perl.or

Re: Parse data

2010-09-25 Thread Jeff Pang
2010/9/25 Santana : > Hi all, > i'am newbie in PERL and i would liked your point of views/opinion for > the following situation : > > i have a file with some lines that presents this format of > information : > > > Anne Gomez ; "5th Avenue ;";"925 NY  " ; 1978/10/11 > ... > > the ";" is the se

Re: automatic searching

2010-09-24 Thread Jeff Pang
> In my file, each line has : ID (8 number) | many key words |key words again > . > I would like to know how to extact only key words part and automatic > searching in website like google. for extracting: use split or regex. for googling: google has provided the SOAP API for programming. There is

Re: Good Perl Books

2010-09-24 Thread Jeff Pang
from PerlFAQ: Recommended books on (or mostly on) Perl follow. References Programming Perl by Larry Wall, Tom Christiansen, and Jon Orwant ISBN 0-596-00027-8 [3rd edition July 2000] http://www.oreilly.com/catalog/pperl3/

Re: Good books for System , Network Admin tasks with perl

2010-09-22 Thread Jeff Pang
2010/9/22 Kammen van, Marco, Springer SBM NL : >>Network Administration > > http://www.amazon.com/Network-Programming-Perl-Lincoln-Stein/dp/02016157 > 11 > Me second. Network Programming with Perl by Lincoln D. Stein is a great book! Vokern. -- To unsubscribe, e-mail: beginners-unsubscr...@per

Re: next in foreach loop

2010-08-12 Thread Jeff Pang
2010/8/13 Kryten : > Hi, > > Complete newbie. > > Is there any way to use "next" from within a foreach loop? > Sure. $ perl -le ' > for (1..10) { > next if $_ == 5; > print; > } ' 1 2 3 4 6 7 8 9 10 -- Jeff Pang http://home.arco

Re: Digital signatures using MIME::Lite

2010-08-09 Thread Jeff Pang
2010/8/9 Ramprasad Prasad : > Hi, > > I have a custome MIME::Lite / MIME::Parser  script that picks up data from a > DB and sends a mail. > Now I need to digitally sign this mail > What the module I have used for this purpose. http://search.cpan.org/~agul/Crypt-PGP5-1.38/PGP5.

Re: ipv4 to ipv6 conversion

2010-08-04 Thread Jeff Pang
2010/8/5 Noah : > Hi there, > > is there a perl module that does a decent job converting an ipv4 address to > an ipv6 address? > Maybe this one? http://search.cpan.org/~manu/Net-IP-1.25/IP.pm -- Jeff Pang http://home.arcor.de/pangj/ -- To unsubscribe, e-mail: beginners-unsub

Re: A new recipe as arrived

2010-07-24 Thread Jeff Pang
very basic in every area. > That sounds interesting. There is already the module for exception on CPAN: http://search.cpan.org/~pjordan/Exception-1.7/Exception.pm So what's the difference between them? Regards. -- Jeff Pang http://home.arcor.de/pangj/ -- To unsubscribe, e-mail: be

Re: Get variable name from a list

2010-07-24 Thread Jeff Pang
lue ; create hash with and dereferenced value as value > } > Mike, Please post the question to the list, not just to me, that will help you get better helps. -- Jeff Pang http://home.arcor.de/pangj/ -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/

Re: Get variable name from a list

2010-07-24 Thread Jeff Pang
> That would be a hash slice: @hash{$filename,$file_start,$file_time,$video_track,$audio_track,$quality,$sync} = (); see perldoc perldata: http://perldoc.perl.org/perldata.html -- Jeff Pang http://home.arcor.de/pangj/ -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional co

Re: cgi sqlite error not able to write data in database

2010-07-24 Thread Jeff Pang
2010/7/24 perl : > > This is the Error .. got from Apache ... > DBD::SQLite::db do failed: unable to open database file at > Specify the full path to the sqlite database file. You may know the absolute path of it, but Apache won't. -- Jeff Pang http://home.arcor.de/pangj/ -

Re: piping input to ssh session

2010-07-23 Thread Jeff Pang
md("foo"); $ssh->cmd("bar"); SSH-2 fully supports running more than one command over the same connection. -- Jeff Pang http://home.arcor.de/pangj/ -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/

Re: Compare file/dir size

2010-07-23 Thread Jeff Pang
hem to see how it works for your purpose. Regards. -- Jeff Pang http://home.arcor.de/pangj/ -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/

Re: Example code for storing picture in MySQL DB

2010-07-21 Thread Jeff Pang
ce: http://forums.mysql.com/read.php?20,17671,27914#msg-27914 For myself I never wanted to insert picture into mysql, there are other solutions instead. How about MogileFS? http://danga.com/mogilefs/ -- Jeff Pang http://home.arcor.de/pangj/ -- To unsubscribe, e-mail: beginners-unsubscr...@per

Perl 6 soon?

2010-07-21 Thread Jeff Pang
I saw the words from a people's blog: After only a short ten year wait, a Perl 6 implementation is scheduled for release this month. Rakudo * (aka Rakudo Star) will be inaugurated on July 29th, 2010. Does this mean Perl 6 will be first released soon? Regards. -- Jeff Pang http://home.arc

Re: META - Bounces from the list

2010-07-21 Thread Jeff Pang
ged my email address > domain from googlemail.com to gmail. I can't now un-subscribe because > the mailer program will not recognise my new address if I send an > email to "beginners-unsubscr...@perl.org" and there not longer seems > to be an admin page for

Re: MIME::Lite::TT::HTML - Default template

2010-07-20 Thread Jeff Pang
ME::Lite you should have the chance to specify the format for the message body, for example, is this a html message or a plain text message. So I may think this behavior decide which template your message should choose. -- Jeff Pang http://home.arcor.de/pangj/ -- To unsubscribe, e-mail:

Re: Perl stat script ... ???

2010-07-18 Thread Jeff Pang
on Solaris and HP-UX so am > thinking a Perl script should be the way to go then instead so I can have it > on any UNIX's flavours. > I have been using File::Stat which may bring some helps to you. http://search.cpan.org/~makoto/File-Stat-0.01/Stat.pm -- Jeff Pang http://home.arc

Re: unary not?

2010-07-15 Thread Jeff Pang
didn't work.) > I dont think that's helpful much for the actual programming, since !$a works fine enough. C:\>perl -e "$a=0;print !$a" 1 C:\>perl -e "$a=1;print !$a" -- Jeff Pang http://home.arcor.de/pangj/ -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/

Re: Track user login status

2010-07-10 Thread Jeff Pang
-Original-Nachricht- > Subject: Track user login status > Date: Sun, 11 Jul 2010 03:33:27 +0200 > From: Mimi Cafe > To: > > I am using Apache::Session to manage my cgi sessions, so to achieve > this, I am thinking of sending a token with each page to the user > which they will return

Re: adding \n?

2010-07-06 Thread Jeff Pang
-Original-Nachricht- > Subject: adding \n? > Date: Wed, 07 Jul 2010 05:30:14 +0200 > From: Noah > To: Perl Beginners > Hi there, > > I want to add '\n' to each element of @contact_list. > what are my options for doing so? > Hi, Perl's map function does that for you. $ perl -e '@x=

Re: Fork ssh

2010-06-16 Thread Jeff Pang
2010/6/17 Unknown User : > > > This works pretty well, but Since There is More than One Way to DO it, > i wonder if anyone has another version that does not use fork? > Just use the right one for you. Instead of processes, the Threads and Coro may also do that well. Regards. -- To unsubscribe,

Re: What is the best way to parse a GPX (XML) file

2010-06-16 Thread Jeff Pang
2010/6/16 robert Key : > Hi I would like to parse  GPX file (XML) and insert certain data items into > a MySQL database. There are mulitude of XML modules which can be used. > > These modules all build a hash from the data. Is this done because it is > easy to find the the data simply using the key

Re: Developing Complex Event Processing (CEP) applications in perl

2010-05-11 Thread Jeff Pang
2010/5/11 Amit Saxena : > Hello all, > > Please let me know if anybody has any idea on the development of Complex > Event Processing (CEP) applications in perl. > Maybe POE is your friend: http://poe.perl.org/ -- Tech support agency in China http://duxieweb.com/ -- To unsubscribe, e-mail: beg

Re: fork, read from child process and timeout

2010-05-11 Thread Jeff Pang
2010/5/11 Weizhong Dai : > Hi all, > > - > $pid = open(README, "program arguments |")  or die "Couldn't fork: $!\n"; > while () { >    # ... > } > close(README) > -- > > my problem is: I read from README, but if  waiting for next input

Re: How to use the module: XML::Parser

2010-05-11 Thread Jeff Pang
2010/5/11 Parag Kalra : > Hey All, > > I am trying to design some scripts using the module - XML::Parser > > To start  learning I have a very basic scenario. Suppose I have following > XML file: > > > My Tag1 > My Tag2 > My Tag3 > > > I want to save the the tags as the keys of a Hash and respecti

Re: beginners Digest 4 May 2010 07:42:13 -0000 Issue 3941

2010-05-04 Thread Jeff Pang
2010/5/4 FRASER, KAREN R. : > How do I unsubscribe from this? > I've sent at least three emails to beginners-digest-unsubscr...@perl.org > following the instructions in > If you want to quit from this list (perl beginners) you should write a message to: beginners-unsubscr...@perl.org HTH. -- T

Re: Perl executable

2010-04-28 Thread Jeff Pang
re still in the dark searching for the opening, can someone please > shower light to this? Thanks > perldoc -q 'hide the source' -- Jeff Pang http://home.arcor.de/pangj/ -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/

Re: Interactive shell in Perl

2010-04-27 Thread Jeff Pang
On Wed, Apr 28, 2010 at 2:38 PM, Parag Kalra wrote: > Hey All, > > Wanted to know if Perl has any interactive shell (just like Python, Bash, > Ruby etc have) by any chance. And if yes how do we invoke that. > > Cheers, > Parag > There is a Perl shell named as "psh&

Re: UNIX permission bit calculator ... ???

2010-04-21 Thread Jeff Pang
n a file or directory. Am looking for a script that will display > the permission bits and then just display what those permission bit settings > are and its correspong number equivalent. > > I've found some on the web via Google but none of them is a script > Any suggested li

Re: Local and global at the same time?

2010-04-20 Thread Jeff Pang
ch guidelines? > You really should read this article: http://perl.plover.com/FAQs/Namespaces.html.en -- Jeff Pang http://home.arcor.de/pangj/ -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/

Re: Is there any method to tell different between warning and errors?

2010-04-19 Thread Jeff Pang
the ERROR messages to be logged in the file. Is there try this: system "command arguments 2>error.txt"; -- Jeff Pang http://home.arcor.de/pangj/ -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/

Re: assign operator

2009-12-11 Thread Jeff Pang
Irfan Sayed: Hi All, Can somebody please tell me what is the difference between "=" and ":=" sign in case of perl?? I never saw ":=" in any perl code. Also I checked perlop and didn't find that a symbol. http://perldoc.perl.org/perlop.html -- Jeff Pang

Re: passing Hash to subroutine help please

2009-12-08 Thread Jeff Pang
John W. Krahn: Jeff Pang wrote: Noah: sub exiting { my ($hostname, %login) = @_; Passing arguments like this has no such problem. But you'd better pass the hash as a reference to the subroutine. exitint($hostname, \%login); sub exiting { my $hostname = shift; my %

Re: passing Hash to subroutine help please

2009-12-08 Thread Jeff Pang
print "login: $login $hostname\n"; I don't see where you defined the variable of $login. Have you 'use strict' and 'use warnings'? -- Jeff Pang http://home.arcor.de/pangj/ -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional comman

Re: Eval scoping question

2009-12-08 Thread Jeff Pang
Shlomi Fish: On Tuesday 08 Dec 2009 11:46:59 Jeff Pang wrote: Shlomi Fish: Regarding using string eval "" - you can do the same using UNIVERSAL::can, which would be safer in this case: <<<< __PACKAGE__->can("asub")->(@params); or define a package an

Re: Eval scoping question

2009-12-08 Thread Jeff Pang
Shlomi Fish: Regarding using string eval "" - you can do the same using UNIVERSAL::can, which would be safer in this case: <<<< __PACKAGE__->can("asub")->(@params); or define a package and use AUTOLOAD method? -- Jeff Pang http://home.arco

Re: Eval scoping question

2009-12-08 Thread Jeff Pang
an eval here. use strict; use warnings; our $abc = "abc\n"; sub asub { print $abc; } asub; Also you may want to know something about Perl's variable scope, see: http://perl.plover.com/FAQs/Namespaces.html.en -- Jeff Pang http://home.arcor.de/pangj/ -- To unsubscribe, e-

Re: Can I design a website using Perl

2009-12-05 Thread Jeff Pang
d "perldoc DBI". And you may need to install the database driver, for example, you are using Mysql, then should install DBD::mysql for DBI. For other sources, try google "Ovid's CGI Course", I remember there is such a free CGI course made by Ovid. -- Jeff Pang

Re: Connection pooling implementation in perl

2009-11-25 Thread Jeff Pang
Hi, If you're running a webprom under mod_perl, then Apache::DBI is maybe what you wanted. On Nov 26, 2009, Praveena Vittal wrote: Hi All, We would like to implement connection pooling for mysql database in Perl. Can anyone help in this? -- To unsubscribe, e-mail: beginners-unsubscr

Re: Is unlink() supposed to provide an error message on failure?

2009-11-18 Thread Jeff Pang
So write the code like: unlink $file or die $!; This will throw up an error message and die. On Nov 19, 2009, David Christensen wrote: beginners: Is unlink() supposed to provide an error message on failure? The documentation does not say so: http://www.perl.com/doc/manual/html/pod/pe

Re: Re: Looking for advise on storring a complex array

2009-11-18 Thread Jeff Pang
For SQLite, just perl -MCPAN -e 'install DBD::SQLite', then use the general DBI to create and access SQLite database. you even don't need to install SQLite binary program. On Nov 18, 2009, Dermot wrote: 2009/11/18 Rob Coops : > On Mon, Nov 16, 2009 at 10:09 PM, Rene Schickbauer < > rene.schick

Re: Emailing all pdf files in a directory

2009-11-17 Thread Jeff Pang
This module's document is very few. I think you should write with @files = to get the full path for pdf files. After that you pass the anex argument when calling the function: my $status = Mail::SendEasy::send( smtp => 'localhost' , ... anex => \...@files, ); HTH. On Nov

Re: how do i ???

2009-11-17 Thread Jeff Pang
Hi, seems you're in un*x shell, so ">" is a valid redirection for perl script's output. if you also want to redirect the stderr then do: perl my.pl > out.txt 2>&1 redirect STDOUT in perl script itself: open HD,">","out.txt" or die $!; open STDOUT,">&HD" or die $!; HTH. On Nov 17, 2009, Sub

Re: Perl CGI Incremental find

2009-11-17 Thread Jeff Pang
This is the stuff JavaScript will do, nothing about CGI, which is a server-end implement. On Nov 17, 2009, Dave Tang wrote: Hi everybody, Is it possible to implement an incremental find* feature on a Perl CGI page? I'm running Apache2 with mod_perl on linux. For example, if I have a list

Re: Re: return {}->{'name'};

2009-11-14 Thread Jeff Pang
On Nov 15, 2009, Uri Guttman wrote: > "PK" == Parag Kalra writes: >and yes, that is declaring a constant. you can tell it is a hash as it >is initialized to a hash reference. it makes little sense to me why you >would declare such a beast as the reference can have its contents >altered a

Re: execute in another terminal

2009-09-04 Thread Jeff Pang
l's system() or `` does? system(...) or `...` will run another process but it's in the same terminal. I'm not sure why you want to open another terminal for tasks. :) -- Jeff Pang pa...@vfemail.net -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional

  1   2   3   4   5   6   7   8   9   >