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 most

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 th

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 additional

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

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

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 are the

Re: File::Find script questions

2011-07-19 Thread Uri Guttman
> "M" == Marc writes: M>Thanks to both Uri and John for their input. I've added your suggestions and the script is much cleaner and more concise now. M>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

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 pro

Re: File::Find script questions

2011-07-18 Thread Uri Guttman
> "M" == Marc writes: M>The script works great but I'd like to get advice on how I can M>clean up my code, so any comments are welcome. M>Also, do I really need the foreach block in there? I couldn't M>get it to work without it, but it seems like I should be able

Re: File::Find script questions

2011-07-18 Thread Uri Guttman
> "HW" == Hal Wigoda 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 Developer Recruit

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 Hal Wigoda
Why clean it up when it works and is not obfusticating. On Mon, Jul 18, 2011 at 8:59 PM, 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 scr

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: perl interview questions

2011-04-25 Thread Shlomi Fish
etimes 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 kno

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

Re: perl interview questions

2011-04-24 Thread Shlomi Fish
iewee is knowledgable enough and it's not always necessary 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 cam

Re: perl interview questions

2011-04-24 Thread Shawn H Corey
hink 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 wha

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 > "prep

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

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 kno

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 f

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: L

Re: perl interview questions

2011-04-21 Thread Owen
> On Thu, Apr 21, 2011 at 9:07 AM, Luis Roca > 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 > already

Re: perl interview questions

2011-04-21 Thread Brandon McCaig
On Thu, Apr 21, 2011 at 9:07 AM, Luis Roca 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 already knew enough a

Re: perl interview questions

2011-04-21 Thread Luis Roca
sition? Is this a systems 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 manag

Re: perl interview questions

2011-04-20 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

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

Re: perl interview questions

2011-04-20 Thread Doug
2011/4/21 Jyoti : > 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 commands, e-mail: begin

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: Questions about optmodel constraints

2010-11-21 Thread Uri Guttman
>>>>> "a" == ayaa 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 vari

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 variabl

Re: Perl general questions

2010-05-13 Thread Uri Guttman
> "APK" == Akhthar Parvez K 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 not needed. I gue

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 mallo

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 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 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

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 Gu

Re: Perl general questions

2010-05-12 Thread Uri Guttman
> "APK" == Akhthar Parvez K 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 the main part?

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, 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 out

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 pin

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

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 circ

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: begin

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

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: 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 t

Re: Basic Perl Questions

2010-02-03 Thread Jim Gibson
On 2/3/10 Wed Feb 3, 2010 6:44 AM, "PolyPusher" 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 want to open it, find

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 PCS

Re: Perl Questions

2009-10-10 Thread Randal L. Schwartz
> "sono-io" == sono-io writes: sono-io>Hello 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 IMHO it's

Re: More questions

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

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 To: beginners@perl.org Sent: Tuesday, October 6, 2009 10:38:53 AM Subject: Re: More questions Slick writes: > I was just wondering once I get the hang of t

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, but

Re: More questions

2009-10-06 Thread Harry Putnam
Slick 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 an expert... bu

Re: Perl Questions

2009-10-06 Thread Randal L. Schwartz
> "Uri" == Uri Guttman writes: > "RLS" == Randal L Schwartz 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 Wal

Re: Perl Questions

2009-10-06 Thread Uri Guttman
> "RLS" == Randal L Schwartz 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 Wall! keep

Re: Perl Questions

2009-10-06 Thread Randal L. Schwartz
> "Tim" == Tim Bowden 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 book, A tw

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

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. > >

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 Lam

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.

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 it

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 the

Re: two questions

2009-08-06 Thread Bryan R Harris
> On Thu, Aug 6, 2009 at 11:54, Bryan R Harris > 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?? >> >> Thanks for

Re: two questions

2009-08-06 Thread Chas. Owens
On Thu, Aug 6, 2009 at 11:54, Bryan R Harris 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?? > > Thanks for the responses,

Re: two questions

2009-08-06 Thread Uri Guttman
> "BRH" == Bryan R Harris 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 language, not jus

Re: two questions

2009-08-06 Thread Bryan R Harris
> On Thu, Aug 6, 2009 at 11:15, 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 d

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 u

Re: FW: two questions

2009-08-06 Thread Chas. Owens
On Thu, Aug 6, 2009 at 11:15, 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

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: beginner

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 d

Re: two questions

2009-08-06 Thread sys adm
"John W. Krahn" To: Perl Beginners 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?

Re: two questions

2009-08-05 Thread Chas. Owens
On Wed, Aug 5, 2009 at 11:06, John W. Krahn wrote: > Chas. Owens wrote: >> >> On Wed, Aug 5, 2009 at 10:01, John W. Krahn 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

Re: two questions

2009-08-05 Thread John W. Krahn
Chas. Owens wrote: On Wed, Aug 5, 2009 at 10:01, John W. Krahn 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 reg

Re: two questions

2009-08-05 Thread Shawn H. Corey
Chas. Owens wrote: On Wed, Aug 5, 2009 at 10:01, John W. Krahn 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 reg

Re: two questions

2009-08-05 Thread Chas. Owens
On Wed, Aug 5, 2009 at 10:01, John W. Krahn 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, so you

Re: two questions

2009-08-05 Thread John W. Krahn
Ed Avis wrote: sys adm 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 05:12, Ed Avis wrote: > sys adm 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

Re: two questions

2009-08-05 Thread Ed Avis
sys adm 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 standard m

Re: two questions

2009-08-04 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-04 Thread Uri Guttman
> "sa" == sys adm 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 with regexes. a

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

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 (<

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

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+)/;

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 E

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 func

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

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 tryi

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

2008-11-17 Thread John W. Krahn
r your careful explanation. I was just in the process 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 (un

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

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

2008-11-17 Thread Telemachus
_of_Records. The filter > /(.*)/ ensures that no newlines are included in the keys or values of > the hash. Thanks for your careful explanation. I was just in the process of writing that I had worked out that the map keeps newlines out. I'll push my luck and ask two further question

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

2008-11-17 Thread John W. Krahn
n parentheses (forcing the items to be treated as a list?) and you can't use {} 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: $/ =

Two questions about split and map in a cookbook recipe

2008-11-17 Thread Telemachus
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. Thanks in advance, Telemachus -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Re: two questions on my perl exam.

2008-10-21 Thread birdinforest
Thanks for your suggestions and all of them make sense. However, since I am a totally beginner never learned programing, it should take me sometime to understand them clearly. I will also try to get answer from my lecturer, then post here that what I have learned from both questions. Programing

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 fau

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 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 po

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 > m

  1   2   3   4   5   >