Re: Questions about CGI

2018-06-06 Thread Jim Gibson
> On Jun 6, 2018, at 2:16 PM, Ahmad Bilal wrote: > > Ok, I went over to previously answered questions under the cgi tag here on > stackoverflow. This message was posted to the Perl Beginners list, so you are not at Stackoverflow any more. > > This seems to be the mo

Questions about CGI

2018-06-06 Thread Ahmad Bilal
Ok, I went over to previously answered questions under the cgi tag here on stackoverflow. This seems to be the most voted one: What is Common Gateway Interface (CGI)? <https://stackoverflow.com/questions/2089271/what-is-common-gateway-interface-cgi> But it still doesn't clear a few things,

Two questions about perl resources

2014-12-04 Thread Ken Peng
Hello, #1. Is there a framework to send/receive the large binary data flow? I know thrift can do, but just don't like it. #2. Is there a native perl library to implement the features which 'iostat' command has? Thanks. -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For

Some UTF-8-related questions

2012-01-11 Thread Hamann, T.D. (Thomas)
Hi, Thanks for the answers on my last question. I have since then dug a bit further in the UTF-8-related error message I got, and after some reading have a few questions with regards to UTF-8 handling in perl: (Please bear in mind that I am not an IT guy) 1a) My use statements

Re: Some UTF-8-related questions

2012-01-11 Thread Brian Fraser
On Wed, Jan 11, 2012 at 7:59 AM, Hamann, T.D. (Thomas) ham...@nhn.leidenuniv.nl wrote: Hi, Thanks for the answers on my last question. I have since then dug a bit further in the UTF-8-related error message I got, and after some reading have a few questions with regards to UTF-8 handling

RE: Some UTF-8-related questions

2012-01-11 Thread Hamann, T.D. (Thomas)
Hi, Thanks for the answers on my last question. I have since then dug a bit further in the UTF-8-related error message I got, and after some reading have a few questions with regards to UTF-8 handling in perl: (Please bear in mind that I am not an IT guy) Worry not -- Basically no IT person

Re: File::Find script questions

2011-07-19 Thread Marc
Thanks to both Uri and John for their input. I've added your suggestions and the script is much cleaner and more concise now. I decided to keep the header info in the sub because I'm now setting the subject to the path of the error log, so at a glance I know where there's a

Re: File::Find script questions

2011-07-19 Thread Uri Guttman
M == Marc sono...@fannullone.us writes: MThanks to both Uri and John for their input. I've added your suggestions and the script is much cleaner and more concise now. MI decided to keep the header info in the sub because I'm now setting the subject to the path of the error log,

File::Find script questions

2011-07-18 Thread Marc
I've written a script to traverse my web server, find any files called error_log, e-mail them to me, and then delete them. It is triggered by cron twice a day. The script works great but I'd like to get advice on how I can clean up my code, so any comments are welcome.

Re: File::Find script questions

2011-07-18 Thread Hal Wigoda
Why clean it up when it works and is not obfusticating. On Mon, Jul 18, 2011 at 8:59 PM, Marc sono...@fannullone.us wrote:        I've written a script to traverse my web server, find any files called error_log, e-mail them to me, and then delete them.  It is triggered by cron twice a day.

Re: File::Find script questions

2011-07-18 Thread John W. Krahn
Marc wrote: I've written a script to traverse my web server, find any files called error_log, e-mail them to me, and then delete them. It is triggered by cron twice a day. The script works great but I'd like to get advice on how I can clean up my code, so any comments are welcome. Also, do I

Re: File::Find script questions

2011-07-18 Thread Uri Guttman
HW == Hal Wigoda hal.wig...@gmail.com writes: HW Why clean it up when it works and is not obfusticating. because he asked for comments and it will be educational to all on the list. uri -- Uri Guttman -- uri AT perlhunter DOT com --- http://www.perlhunter.com -- Perl

Re: File::Find script questions

2011-07-18 Thread Uri Guttman
M == Marc sono...@fannullone.us writes: MThe script works great but I'd like to get advice on how I can Mclean up my code, so any comments are welcome. MAlso, do I really need the foreach block in there? I couldn't Mget it to work without it, but it seems like I should

Re: perl interview questions

2011-04-25 Thread Akhthar Parvez K
On Monday 25 Apr 2011, Shlomi Fish wrote: On Sunday 24 Apr 2011 21:01:57 Shawn H Corey wrote: On 11-04-24 10:36 AM, Akhthar Parvez K wrote: [ snip ] I still think I have to disagree. Sometimes interviewers ask purposely obscure questions not to see if you know the answer but to see what

Re: perl interview questions

2011-04-25 Thread Shlomi Fish
questions not to see if you know the answer but to see what you'd do if you came across a problem you couldn't immediately solve when on the job. The best response is to state you don't know and then tell what you'd do: 1. Inform your immediate supervisor about the problem

Re: perl interview questions

2011-04-24 Thread Akhthar Parvez K
Hi Jyoti, On Thursday 21 Apr 2011, Jyoti wrote: Please give me any link or any tutorial which will be helpful for preparation of PERL interview. I don't honestly think someone would write an article or tutorial about preparing for a Perl interview. That should actually split into two:

Re: perl interview questions

2011-04-24 Thread Shawn H Corey
On 11-04-24 09:48 AM, Akhthar Parvez K wrote: #5 - Never give a wrong answer - If at all you receive a question that you don't know, do not panic, just be smart and divert the question so you can answer what you know. If you don't know the answer, say so. Then state how you would go about

Re: perl interview questions

2011-04-24 Thread Akhthar Parvez K
On Sunday 24 Apr 2011, Shawn H Corey wrote: On 11-04-24 09:48 AM, Akhthar Parvez K wrote: #5 - Never give a wrong answer - If at all you receive a question that you don't know, do not panic, just be smart and divert the question so you can answer what you know. If you don't know the

Re: perl interview questions

2011-04-24 Thread Shlomi Fish
On Sunday 24 Apr 2011 17:13:18 Shawn H Corey wrote: On 11-04-24 09:48 AM, Akhthar Parvez K wrote: #5 - Never give a wrong answer - If at all you receive a question that you don't know, do not panic, just be smart and divert the question so you can answer what you know. If you don't know

Re: perl interview questions

2011-04-24 Thread Shlomi Fish
On Sunday 24 Apr 2011 16:48:10 Akhthar Parvez K wrote: Hi Jyoti, On Thursday 21 Apr 2011, Jyoti wrote: Please give me any link or any tutorial which will be helpful for preparation of PERL interview. I don't honestly think someone would write an article or tutorial about preparing for

Re: perl interview questions

2011-04-24 Thread Shawn H Corey
think I have to disagree. Sometimes interviewers ask purposely obscure questions not to see if you know the answer but to see what you'd do if you came across a problem you couldn't immediately solve when on the job. The best response is to state you don't know and then tell what you'd do: 1

Re: perl interview questions

2011-04-24 Thread Shlomi Fish
to have that happened by an answer he expected. I still think I have to disagree. Sometimes interviewers ask purposely obscure questions not to see if you know the answer but to see what you'd do if you came across a problem you couldn't immediately solve when on the job. The best

Re: perl interview questions

2011-04-21 Thread Shlomi Fish
Hi Jyoti, On Thursday 21 Apr 2011 07:49:00 Jyoti wrote: Hello All, Please give me any link or any tutorial which will be helpful for preparation of PERL interview. First of all, see: * http://perl-begin.org/learn/Perl-perl-but-not-PERL/ (It's either Perl or perl, but never PERL. It is a

Re: perl interview questions

2011-04-21 Thread Luis Roca
administrative job? It's difficult to give you prep questions for an interview without even knowing what the job title is you are interviewing for or what kind of work this company/companies do. ;-) However for some general topics chromatic wrote a list of expertise managers -should- be asking

Re: perl interview questions

2011-04-21 Thread Brandon McCaig
On Thu, Apr 21, 2011 at 9:07 AM, Luis Roca luie.r...@gmail.com wrote: Again, if you provided some more information about the position (the company's job description) I'm sure people can give you more specific help – good luck! Wouldn't it be nice though if the people conducting interviews

Re: perl interview questions

2011-04-21 Thread Owen
On Thu, Apr 21, 2011 at 9:07 AM, Luis Roca luie.r...@gmail.com wrote: Again, if you provided some more information about the position (the company's job description) I'm sure people can give you more specific help – good luck! Wouldn't it be nice though if the people conducting interviews

perl interview questions

2011-04-20 Thread Jyoti
Hello All, Please give me any link or any tutorial which will be helpful for preparation of PERL interview. Thanks in advance. Jyoti

Re: perl interview questions

2011-04-20 Thread Doug
2011/4/21 Jyoti jyoti.bans...@gmail.com: Hello All, Please give me any link or any tutorial which will be helpful for preparation of PERL interview. There are lots. But, doesn't google give you any info you want? -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional

Re: perl interview questions

2011-04-20 Thread Alan Haggai Alavi
Hello Jyoti, Please give me any link or any tutorial which will be helpful for preparation of PERL interview. Please read `perldoc perlfaq` (http://perldoc.perl.org/perlfaq.html). It is a collection of frequently asked questions which will certainly help you at an interview. Regards, Alan

Questions about optmodel constraints

2010-11-21 Thread ayaa
I have three questions: 1. If I have a variable that is stored in a data set and I want to formulate only one constraint (under optmodel) that is a function of all the data set's observations of this variable and a decision variable. Suppose the variable is a and x is the decision variable. My

Re: Questions about optmodel constraints

2010-11-21 Thread Uri Guttman
a == ayaa ayaafa...@gmail.com writes: a I have three questions: a 1. If I have a variable that is stored in a data set and I want to a formulate only one constraint (under optmodel) that is a function of a all the data set's observations of this variable and a decision a variable

Re: Perl general questions

2010-05-13 Thread Akhthar Parvez K
Hi Uri, Not sure if it was because I've been dealing with mainly web servers for the past few years, but I always read your name as U-R-I instead of Uri. :-) It looks like you've got a name that's relevant to your profession, most of us didn't have that fortune! On Thursday 13 May 2010, Uri

Re: Perl general questions

2010-05-13 Thread Shlomi Fish
On Thursday 13 May 2010 11:59:36 Akhthar Parvez K wrote: Hi Uri, APK 3) Also, am I correct in guessing that the memory that's used to APK allocate a variable defined with 'my' will be freed up once the APK current lexical scope is exited? true but with a file lexical (or global)

Re: Perl general questions

2010-05-13 Thread Akhthar Parvez K
On Thursday 13 May 2010, Shlomi Fish wrote: Then it is very likely that the memory allocated to the mem pointer will not be returned to the kernel due to the nature of malloc() and how it is an abstraction above sbrk(): http://linux.die.net/man/2/sbrk perl 5 makes use of sbrk

Re: Perl general questions

2010-05-13 Thread Akhthar Parvez K
On Thursday 13 May 2010, Akhthar Parvez K wrote: On Thursday 13 May 2010, Shlomi Fish wrote: Then it is very likely that the memory allocated to the mem pointer will not be returned to the kernel due to the nature of malloc() and how it is an abstraction above sbrk():

Re: Perl general questions

2010-05-13 Thread Shlomi Fish
On Thursday 13 May 2010 14:56:37 Akhthar Parvez K wrote: On Thursday 13 May 2010, Akhthar Parvez K wrote: On Thursday 13 May 2010, Shlomi Fish wrote: Then it is very likely that the memory allocated to the mem pointer will not be returned to the kernel due to the nature of malloc() and

Re: Perl general questions

2010-05-13 Thread Uri Guttman
APK == Akhthar Parvez K akht...@sysadminguide.com writes: APK Yes, I think the memory space allocated by a process using APK malloc() can't be really freed up until the calling process is APK terminated. And processes that uses mmap() can unmap those chunk APK size of memory when it's

Perl general questions

2010-05-12 Thread Akhthar Parvez K
Hello, Just want to ensure my understanding about Perl basics is solid. In order to do that, I have a few questions to be cleared up front. 1) Since a hash defined in the main part (outside the subroutines) of a program can be accessed from anywhere (from all subroutines), is it fine

Re: Perl general questions

2010-05-12 Thread Uri Guttman
APK == Akhthar Parvez K akht...@sysadminguide.com writes: APK 1) Since a hash defined in the main part (outside the APK subroutines) of a program can be accessed from anywhere (from all APK subroutines), is it fine, in regards to security or even code APK elegancy, if we define a hash in

Re: More basic questions

2010-02-13 Thread PolyPusher
On Feb 10, 9:03 am, jwkr...@shaw.ca (John W. Krahn) wrote: PolyPusher wrote: All, Hello, I have a file that defines pins for an IC.   The code needs to find .SUBCKT RE1321_4 and produce a list that complies with SKILL(lisp) context for Cadence tool suite, the output needs to like

More basic questions

2010-02-10 Thread PolyPusher
All, I have a file that defines pins for an IC. The code needs to find .SUBCKT RE1321_4 and produce a list that complies with SKILL(lisp) context for Cadence tool suite, the output needs to like (Ant DCS_RX.. last pin ) and outputs to a file... If pins list in the file do not fit on one

Re: More basic questions

2010-02-10 Thread John W. Krahn
PolyPusher wrote: All, Hello, I have a file that defines pins for an IC. The code needs to find .SUBCKT RE1321_4 and produce a list that complies with SKILL(lisp) context for Cadence tool suite, the output needs to like (Ant DCS_RX.. last pin ) and outputs to a file... If pins list

Re: Basic Perl Questions

2010-02-08 Thread PolyPusher
On Feb 3, 2:26 pm, jwkr...@shaw.ca (John W. Krahn) wrote: PolyPusher wrote: Hi All, Hello, I have some Perl experience but has been awhile.   I mainly write SKILL lisp programs for Cadence CAD for a layout group(we are a IC design center). I have a CBR(describes circuit) file and

Need email list for Perl/Tk questions

2010-02-04 Thread Tony Esposito
Besides this forum, does anyone know of a good Perl/Tk email list/forum in which to ask questions about Perl/Tk?

Re: Need email list for Perl/Tk questions

2010-02-04 Thread Paul Johnson
On Thu, Feb 04, 2010 at 10:22:00PM +, Tony Esposito wrote: Besides this forum, does anyone know of a good Perl/Tk email list/forum in which to ask questions about Perl/Tk? https://mailman.stanford.edu/mailman/listinfo/ptk It's rather quiet, so be patient. -- Paul Johnson - p...@pjcj.net

Re: Need email list for Perl/Tk questions

2010-02-04 Thread Owen
Besides this forum, does anyone know of a good Perl/Tk email list/forum in which to ask questions about Perl/Tk? You can try comp.lang.perl.tk which is fairly quiet -- Owen -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h

Basic Perl Questions

2010-02-03 Thread PolyPusher
Hi All, I have some Perl experience but has been awhile. I mainly write SKILL lisp programs for Cadence CAD for a layout group(we are a IC design center). I have a CBR(describes circuit) file and want to open it, find the line in file .SUBCKT __RE1321_4 HB_GND GSM_RX DCS_RX DCS_VRX GSM_VRX

Re: Basic Perl Questions

2010-02-03 Thread Jim Gibson
On 2/3/10 Wed Feb 3, 2010 6:44 AM, PolyPusher eric.d.fitzsimm...@gmail.com scribbled: Hi All, I have some Perl experience but has been awhile. I mainly write SKILL lisp programs for Cadence CAD for a layout group(we are a IC design center). I have a CBR(describes circuit) file and

Re: Basic Perl Questions

2010-02-03 Thread John W. Krahn
PolyPusher wrote: Hi All, Hello, I have some Perl experience but has been awhile. I mainly write SKILL lisp programs for Cadence CAD for a layout group(we are a IC design center). I have a CBR(describes circuit) file and want to open it, find the line in file Is it just one line or are

Re: Perl Questions

2009-10-10 Thread Randal L. Schwartz
sono-io == sono-io sono...@fannullone.us writes: sono-ioHello everyone. I'm new here, so please forgive me for sono-io replying to a question before asking one, but I never here anyone sono-io talk about Beginning Perl by Simon Cozens. Maybe because it's out sono-io of print(?) but

Re: Perl Questions

2009-10-06 Thread Randal L. Schwartz
Tim == Tim Bowden tim.bow...@mapforge.com.au writes: Just a nit pick - it's the Llama Book - not the Lama book: Tim Bugger. I knew it didn't look quite right. Shoulda chased it up. In the preface of the first edition of the Llama, I composed the following poem: A one-L Randal wrote a

Re: Perl Questions

2009-10-06 Thread Uri Guttman
RLS == Randal L Schwartz mer...@stonehenge.com writes: RLS In the preface of the first edition of the Llama, I composed the RLS following poem: RLS A one-L Randal wrote a book, RLS A two-L Llama for the look, RLS but to whom we owe it all, RLS is the three-L Larry

Re: Perl Questions

2009-10-06 Thread Randal L. Schwartz
Uri == Uri Guttman u...@stemsystems.com writes: RLS == Randal L Schwartz mer...@stonehenge.com writes: RLS In the preface of the first edition of the Llama, I composed the RLS following poem: RLS A one-L Randal wrote a book, RLS A two-L Llama for the look, RLS but to whom we owe it all, RLS is

Re: More questions

2009-10-06 Thread Harry Putnam
Slick jho251...@yahoo.com writes: I was just wondering once I get the hang of this, what things can I program?  What is the pinicale of this? (I do understand that your mind is the limit, but you get my drift) I want to see something that would be worth attaining  Jason H. Owens I'm far from

Re: Perl Questions

2009-10-06 Thread sono-io
What is a good starter perl book to learn perl. Best learning Perl book is 'Learning Perl'. Also known as the Lama book. There are other good texts also, but imho that is by far the best. Hello everyone. I'm new here, so please forgive me for replying to a question before asking one,

Re: More questions

2009-10-06 Thread Slick
Does the information also work with Windows?  I use that most.  Jason H. Owens From: Harry Putnam rea...@newsguy.com To: beginners@perl.org Sent: Tuesday, October 6, 2009 10:38:53 AM Subject: Re: More questions Slick jho251...@yahoo.com writes: I was just

Re: More questions

2009-10-06 Thread Bob goolsby
From: Harry Putnam rea...@newsguy.com To: beginners@perl.org Sent: Tuesday, October 6, 2009 10:38:53 AM Subject: Re: More questions Slick jho251...@yahoo.com writes: I was just wondering once I get the hang of this, what things can I program?  What

Re: Perl Questions

2009-10-05 Thread Shlomi Fish
On Monday 05 Oct 2009 07:01:47 Tim Bowden wrote: On Sun, 2009-10-04 at 15:03 -0700, Slick wrote: I have a couple of questions. What is a good starter perl book to learn perl. Best learning Perl book is 'Learning Perl'. Also known as the Lama book. There are other good texts also

Re: Perl Questions

2009-10-05 Thread Tim Bowden
On Mon, 2009-10-05 at 09:20 +0200, Shlomi Fish wrote: On Monday 05 Oct 2009 07:01:47 Tim Bowden wrote: On Sun, 2009-10-04 at 15:03 -0700, Slick wrote: I have a couple of questions. What is a good starter perl book to learn perl. Best learning Perl book is 'Learning Perl'. Also

More questions

2009-10-05 Thread Slick
I was just wondering once I get the hang of this, what things can I program?  What is the pinicale of this? (I do understand that your mind is the limit, but you get my drift) I want to see something that would be worth attaining  Jason H. Owens

Perl Questions

2009-10-04 Thread Slick
I have a couple of questions. What is a good starter perl book to learn perl. Secondly, I am kinda having trouble assimilating all the perl information. I want to know ways that you all remember the format of a script as well as the main items that are normally use. I know about

Re: Perl Questions

2009-10-04 Thread Shawn H Corey
Slick wrote: I have a couple of questions. What is a good starter perl book to learn perl. Secondly, I am kinda having trouble assimilating all the perl information. I want to know ways that you all remember the format of a script as well as the main items that are normally use. I

Re: Perl Questions

2009-10-04 Thread Tim Bowden
On Sun, 2009-10-04 at 15:03 -0700, Slick wrote: I have a couple of questions. What is a good starter perl book to learn perl. Best learning Perl book is 'Learning Perl'. Also known as the Lama book. There are other good texts also, but imho that is by far the best. Secondly, I am

Re: two questions

2009-08-06 Thread sys adm
...@shaw.ca To: Perl Beginners beginners@perl.org Subject: Re: two questions Date: Tue, 04 Aug 2009 23:24:56 -0700 sys adm wrote: 1. why perl doesn't have a built-in strip() function? Why doesn't BASIC have built-in regular expressions? Why doesn't C have built-in strings? Why doesn't

Re: two questions

2009-08-06 Thread Telemachus
On Thu Aug 06 2009 @ 2:29, sys adm wrote: I do hate to write s/^\s+|\s+$//g for each and each time,just got tired of it. So I hope perl can have that a string operator, since many script languages have that, and it's used universally. Write the subroutine once, and then you won't have to do

FW: two questions

2009-08-06 Thread Bryan R Harris
According to the FAQ you want to do it like this: s/^\s+//, s/\s+$// for $var; I can't find documentation of this notation anywhere, i.e. the comma between statements with a trailing for. John, where do you find all this cool stuff? - Bryan -- To unsubscribe, e-mail:

Re: FW: two questions

2009-08-06 Thread Chas. Owens
On Thu, Aug 6, 2009 at 11:15, Bryan R Harrisbryan_r_har...@raytheon.com wrote: According to the FAQ you want to do it like this: s/^\s+//, s/\s+$// for $var; I can't find documentation of this notation anywhere, i.e. the comma between statements with a trailing for. John, where do you

Re: FW: two questions

2009-08-06 Thread John W. Krahn
Bryan R Harris wrote: According to the FAQ you want to do it like this: s/^\s+//, s/\s+$// for $var; I can't find documentation of this notation anywhere, i.e. the comma between statements with a trailing for. John, where do you find all this cool stuff? This is just something you pick

Re: two questions

2009-08-06 Thread Bryan R Harris
On Thu, Aug 6, 2009 at 11:15, Bryan R Harrisbryan_r_har...@raytheon.com wrote: According to the FAQ you want to do it like this: s/^\s+//, s/\s+$// for $var; I can't find documentation of this notation anywhere, i.e. the comma between statements with a trailing for. John, where

Re: two questions

2009-08-06 Thread Uri Guttman
BRH == Bryan R Harris bryan_r_har...@raytheon.com writes: BRH For some reason the back of my brain thinks if I knew perl as BRH well as you two seem to I could easily make all the money I BRH wanted. Just between you and me =), is that true?? it would be true if you were very good in any

Re: two questions

2009-08-06 Thread Chas. Owens
On Thu, Aug 6, 2009 at 11:54, Bryan R Harrisbryan_r_har...@raytheon.com wrote: snip Now that's just impressive. For some reason the back of my brain thinks if I knew perl as well as you two seem to I could easily make all the money I wanted.  Just between you and me =), is that true??

Re: two questions

2009-08-06 Thread Bryan R Harris
On Thu, Aug 6, 2009 at 11:54, Bryan R Harrisbryan_r_har...@raytheon.com wrote: snip Now that's just impressive. For some reason the back of my brain thinks if I knew perl as well as you two seem to I could easily make all the money I wanted.  Just between you and me =), is that true??

Re: two questions

2009-08-05 Thread Uri Guttman
sa == sys adm sys...@computermail.net writes: sa 1. why perl doesn't have a built-in strip() function? each time I sa need to say $var =~ s/^\s+|\s+//g to strip the blank space before sa and after the variable, specially if this is a CGI var. because it is so easy to write a strip thing

Re: two questions

2009-08-05 Thread John W. Krahn
sys adm wrote: 1. why perl doesn't have a built-in strip() function? Why doesn't BASIC have built-in regular expressions? Why doesn't C have built-in strings? Why doesn't $LANGUAGE have built-in $FEATURE? Because that is the way the language was designed. each time I need to say $var

Re: two questions

2009-08-05 Thread Ed Avis
sys adm sysadm at computermail.net writes: 1. why perl doesn't have a built-in strip() function? each time I need to say $var =~ s/^\s+|\s+//g to strip Good question. Perl 6 is fixing this by adding a 'trim' operator. The code I use is for ($var) { s/\A\s+//; s/\s+\z/ } 2. what's the

Re: two questions

2009-08-05 Thread Chas. Owens
On Wed, Aug 5, 2009 at 05:12, Ed Avise...@waniasset.com wrote: sys adm sysadm at computermail.net writes: 1. why perl doesn't have a built-in strip() function? each time I need to say $var =~ s/^\s+|\s+//g to strip Good question.  Perl 6 is fixing this by adding a 'trim' operator. The code I

Re: two questions

2009-08-05 Thread John W. Krahn
Ed Avis wrote: sys adm sysadm at computermail.net writes: 1. why perl doesn't have a built-in strip() function? each time I need to say $var =~ s/^\s+|\s+//g to strip Good question. Perl 6 is fixing this by adding a 'trim' operator. The code I use is for ($var) { s/\A\s+//; s/\s+\z/ }

Re: two questions

2009-08-05 Thread Chas. Owens
On Wed, Aug 5, 2009 at 10:01, John W. Krahnjwkr...@shaw.ca wrote: snip If you want to use the string in a URL then it cannot be truly random, because not every character can appear in a URL. That does not make sense. snip I believe he/she meant that not every character is allowed in a regex,

Re: two questions

2009-08-05 Thread Shawn H. Corey
Chas. Owens wrote: On Wed, Aug 5, 2009 at 10:01, John W. Krahnjwkr...@shaw.ca wrote: snip If you want to use the string in a URL then it cannot be truly random, because not every character can appear in a URL. That does not make sense. snip I believe he/she meant that not every character is

Re: two questions

2009-08-05 Thread John W. Krahn
Chas. Owens wrote: On Wed, Aug 5, 2009 at 10:01, John W. Krahnjwkr...@shaw.ca wrote: snip If you want to use the string in a URL then it cannot be truly random, because not every character can appear in a URL. That does not make sense. snip I believe he/she meant that not every character is

Re: two questions

2009-08-05 Thread Chas. Owens
On Wed, Aug 5, 2009 at 11:06, John W. Krahnjwkr...@shaw.ca wrote: Chas. Owens wrote: On Wed, Aug 5, 2009 at 10:01, John W. Krahnjwkr...@shaw.ca wrote: snip If you want to use the string in a URL then it cannot be truly random, because not every character can appear in a URL. That does

two questions

2009-08-04 Thread sys adm
1. why perl doesn't have a built-in strip() function? each time I need to say $var =~ s/^\s+|\s+//g to strip the blank space before and after the variable, specially if this is a CGI var. 2. what's the standard module or method to generate a random string, for example the string will be used as

Some GDBM_File questions

2009-04-02 Thread Roger Thompson
1) Can you specify an initial size for the table? I need to load about 2.6 million strings in to a table, and the intermittent reorgs of the table slow the load down considerably. 2) Can you make the table read only? the tie takes GDBM_WRCREAT as a parameter, and a priv spec of 0640. There is

very basic questions

2009-01-28 Thread b chen
i am completely new to perl, can you explain to me the following line of code in red. how does this line of code grab a time value and assign it to $ time, how does assigment happend in this conditiona statement. while () { chop; # Grab the time next unless ($time) = /(\d+:\d+:\d+\,\d+)/;

Re: very basic questions

2009-01-28 Thread Owen
i am completely new to perl, can you explain to me the following line of code in red. how does this line of code grab a time value and assign it to $ time, how does assigment happend in this conditiona statement. while () { chop; # Grab the time next unless ($time) =

Re: very basic questions

2009-01-28 Thread John W. Krahn
b chen wrote: i am completely new to perl, can you explain to me the following line of code in red. There is no red here, there is only black and white. how does this line of code grab a time value and assign it to $ time, how does assigment happend in this conditiona statement. while

A questions about how to split files

2009-01-15 Thread Li, Aiguo (NIH/NCI) [E]
H all, I need to split a file containing three columns of data as shown below into three separate files. Each split file should contain row names and one column of data and the column name should be the file names. Is there any perl advanced function that allow me to do this? probe set

2 questions please, one on scope and one on regex

2008-12-22 Thread Eric Krause
Hello all, I have two quick questions that I would love some help on. I have looked at the manual (Programming Perl) and I didn't get it, hence my email. Question 1 - How can I make variables in a function (subroutine) global (accessible from other functions)? Question 2 - I am trying

Re: 2 questions please, one on scope and one on regex

2008-12-22 Thread Mr. Shawn H. Corey
On Mon, 2008-12-22 at 15:18 -0700, Eric Krause wrote: Hello all, I have two quick questions that I would love some help on. I have looked at the manual (Programming Perl) and I didn't get it, hence my email. Question 1 - How can I make variables in a function (subroutine) global

Re: 2 questions please, one on scope and one on regex

2008-12-22 Thread John W. Krahn
Eric Krause wrote: Hello all, Hello, I have two quick questions that I would love some help on. I have looked at the manual (Programming Perl) and I didn't get it, hence my email. Question 1 - How can I make variables in a function (subroutine) global (accessible from other functions

Two questions about split and map in a cookbook recipe

2008-11-17 Thread Telemachus
reference?!?) Sorry if this is very long. I wanted to make sure to include enough information to make the questions clear. Thanks in advance, Telemachus -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Re: Two questions about split and map in a cookbook recipe

2008-11-17 Thread John W. Krahn
{} because of the outer {} to create the hash reference?!?) Sorry if this is very long. I wanted to make sure to include enough information to make the questions clear. Another way to the same thing would be: $/ = ; while () { push @Array_of_Records, { /^([^:]+):\s*(.*)/mg }; } John -- Perl

Re: Two questions about split and map in a cookbook recipe

2008-11-17 Thread Telemachus
that I had worked out that the map keeps newlines out. I'll push my luck and ask two further questions. First, what exactly is the null field at the start of my first line, or where does it come from? In the version you wrote of my data, you visualized it with a space, but it's not (normally) visible

Re: Two questions about split and map in a cookbook recipe

2008-11-17 Thread Chas. Owens
On Mon, Nov 17, 2008 at 13:21, John W. Krahn [EMAIL PROTECTED] wrote: snip push(@Array_of_Records, { map /(.*)/, @fields }); Store the fields as a hash at the end of @Array_of_Records. The filter /(.*)/ ensures that no newlines are included in the keys or values of the hash. snip Huh,

Re: Two questions about split and map in a cookbook recipe

2008-11-17 Thread John W. Krahn
of writing that I had worked out that the map keeps newlines out. I'll push my luck and ask two further questions. First, what exactly is the null field at the start of my first line, or where does it come from? split always (unless the third argument is 1) splits into at least two fields. If you have

two questions on my perl exam.

2008-10-21 Thread birdinforest
I am a student and enrolled Unix programing this semester. There are two questions relating to perl I can not work out in the last exam ( Actually I have write out my code, however the exam system marked it as wrong). Please help me to point out the fault. Thanks. QUESTION 1 Write a perl script

Re: two questions on my perl exam.

2008-10-21 Thread Chas. Owens
On Tue, Oct 21, 2008 at 08:49, birdinforest [EMAIL PROTECTED] wrote: I am a student and enrolled Unix programing this semester. There are two questions relating to perl I can not work out in the last exam ( Actually I have write out my code, however the exam system marked it as wrong). Please

Re: two questions on my perl exam.

2008-10-21 Thread Rob Dixon
birdinforest wrote: I am a student and enrolled Unix programing this semester. There are two questions relating to perl I can not work out in the last exam ( Actually I have write out my code, however the exam system marked it as wrong). Please help me to point out the fault. Thanks

Re: two questions on my perl exam.

2008-10-21 Thread Chas. Owens
On Tue, Oct 21, 2008 at 10:43, Rob Dixon [EMAIL PROTECTED] wrote: snip snip use strict; use warnings; print join('', @ARGV =~ /[0-9]/g), \n; snip The perl interpreter in my brain throws a syntax error on the line 4 character 15. Since you have put your code out there here is mine:

Re: two questions on my perl exam.

2008-10-21 Thread John W. Krahn
birdinforest wrote: I am a student and enrolled Unix programing this semester. There are two questions relating to perl I can not work out in the last exam ( Actually I have write out my code, however the exam system marked it as wrong). Please help me to point out the fault. Thanks. QUESTION

  1   2   3   4   5   6   >