RE: why shift @_ ?

2002-02-03 Thread Timothy Johnson
I haven't really checked, to be honest, but I would guess that in a large program it would be quicker because there are fewer variable declarations, so the compiler doesn't have to allocate space for variables that will be destroyed right away anyway (if they are lexically scoped, as they sh

Re: why shift @_ ?

2002-02-03 Thread John W. Krahn
Timothy Johnson wrote: > > If you wanted to use shift to make an equivalent routine to Ex #1, you could > do it like this: > > sub makeArray{ >while(shift @_){ > print $_."\n"; >} > } > > That way if you called the sub like this... > >&makeArray('hello','world','!'); > > You

RE: why shift @_ ?

2002-02-03 Thread Jeff 'japhy' Pinyan
On Feb 3, Timothy Johnson said: >sub makeArray{ > while(shift @_){ > print $_."\n"; > } >} > >That way if you called the sub like this... > > &makeArray('hello','world','!'); > >You should get this... > > hello > world > ! You SHOULD, but you don't. >as your output. 'shift' re

RE: absolute beginner has questions

2002-02-03 Thread Timothy Johnson
I hate to say it since you just bought a book, but you might find that you'll have more luck with a book that is more focused on Perl in general. If that is the book that I am thinking of, it has more to do with how to apply knowledge of Perl to a Win32 environment. Everyone has their favorite,

Re: why shift @_ ?

2002-02-03 Thread jbajin
That's a very cool way of using that while loop and array. I got to see about using that. Is it considered any quicker or less memory intensive?

RE: why shift @_ ?

2002-02-03 Thread Timothy Johnson
If you wanted to use shift to make an equivalent routine to Ex #1, you could do it like this: sub makeArray{ while(shift @_){ print $_."\n"; } } That way if you called the sub like this... &makeArray('hello','world','!'); You should get this... hello world ! as your

Re: wildcard for unix????

2002-02-03 Thread Chas Owens
On Sun, 2002-02-03 at 15:54, [EMAIL PROTECTED] wrote: > > What is the global wildcard for unix? > I'm trying to chmod 755 all files in a dir... possible? > chmod 755 *.* ? > Thanks > LH *.* will match any filename with a '.' in it. Since Unix uses permissions to determine whether a file i

RE: Perl FAQ

2002-02-03 Thread Brett W. McCoy
On Sun, 3 Feb 2002, Russ Foster wrote: > Yes, I know there is a search function on the web page...but when I search > for something simple like "open file", "read file", or even "roman > numbers/numerals (see above)" turns up no referenes. You know... all of those FAQs are also distributed with

RE: Perl FAQ

2002-02-03 Thread Russ Foster
The FAQs at *.perl.com or *.perldoc.com are helpful, but seemingly limited. Of the questions that regularly appear on this list (aka "frequently asked questions")...how many of them can be answered by something at: http://www.perl.com/pub/q/FAQs ? The FAQs at www.perl.com are not for "beginner"

Re: How to resize images with perl

2002-02-03 Thread Marek Polonski
> Awesome! is there anyway to do this using GD also? image magick wont seem > to install from CPAN - keeps returning bad make status. There are two articles in WDVL that explain this http://www.wdvl.com/Authoring/Languages/Perl/ Marek -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional

Re: Evaluating case..

2002-02-03 Thread John W. Krahn
Lorne Easton wrote: > > Here is some code that I have written. I know that there is a better way of > writing this. As it stands the > code between the "#Evaluation code" does not work as desired. I cannot seem > to get these if ((case1) and (case2)) > type statements to work. How would I and wha

Re: Evaluating case..

2002-02-03 Thread Jeff 'japhy' Pinyan
On Feb 4, Lorne Easton said: >Here is some code that I have written. I know that there is a better way >of writing this. As it stands the code between the "#Evaluation code" >does not work as desired. I cannot seem to get these if ((case1) and >(case2)) type statements to work. How would I and wh

Evaluating case..

2002-02-03 Thread Lorne Easton
Here is some code that I have written. I know that there is a better way of writing this. As it stands the code between the "#Evaluation code" does not work as desired. I cannot seem to get these if ((case1) and (case2)) type statements to work. How would I and what am I doing wrong? Also, is ther

RE: Word documents

2002-02-03 Thread Steve Howard
I apologize - I seem pretty brain dead this weekend - I didn't get all that script pasted into that e-mail, here is the full script: #! Perl use strict; use Win32::OLE qw(in with); use Win32::OLE::Const 'Microsoft Word'; use Win32::OLE::Const 'Microsoft Excel'; $Win32::OLE::Warn = 3; my $wd = W

Re: why shift @_ ?

2002-02-03 Thread Jeff 'japhy' Pinyan
On Feb 3, david wright said: >I have seen Ex #1 "corrected" (as being more well written) to Ex #2. In >this case it is just being passed a $ but the data being passed was >irrelevant. (though not a ref) I still don't see why, i guess i don't >fully understand "shift". Any light shedder's appre

Re: wildcard for unix????

2002-02-03 Thread Shawn
I believe you can do it with just chmod 755 *... Shawn - Original Message - From: "Luinrandir Hernson" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Sunday, February 03, 2002 2:54 PM Subject: wildcard for unix What is the global wildcard for unix? I'm

RE: wildcard for unix????

2002-02-03 Thread ss004b3324
> What is the global wildcard for unix? > I'm trying to chmod 755 all files in a dir... possible? > chmod 755 *.* ? chmod 755 * <- for all files chmod 755 *pl <- for all files with a .pl extension chmod -R 755 * <- all files and recursively through all sub-directories Shaun --- Outgoing m

re: why shift @_ ?

2002-02-03 Thread david wright
> I have seen Ex #1 "corrected" (as being more well written) to Ex #2. > In this case it is just being passed a $ but the data being passed was > irrelevant. (though not a ref) I still don't see why, i guess i don't > fully understand "shift". Any light shedder's appreciated, thanks : -) > >

re: wildcard for unix???

2002-02-03 Thread david wright
LH wrote: "What is the global wildcard for unix? I'm trying to chmod 755 all files in a dir... possible? chmod 755 *.* ? Thanks LH ahh, so close chmod 775 * -dw5

Re: why shift @_ ?

2002-02-03 Thread Jenda Krynicky
From: david wright <[EMAIL PROTECTED]> > I have seen Ex #1 "corrected" (as being more well written) to Ex #2. > In this case it is just being passed a $ but the data being passed was > irrelevant. (though not a ref) I still don't see why, i guess i don't > fully understand "shif

wildcard for unix????

2002-02-03 Thread Luinrandir Hernson
What is the global wildcard for unix? I'm trying to chmod 755 all files in a dir... possible? chmod 755 *.* ? Thanks LH

Word documents

2002-02-03 Thread Guru^garzaH
I would be in much apreciation to whomever could point me to a good learning on formating output, but using standard fonts. even PCL would be ok. My ultimate goal is a word doc converter if some one knows of a good pm. Please let me know thanks.

Re: absolute beginner has questions

2002-02-03 Thread Dave Benware
Dave K wrote: > > Thomas, > Any editor (I use notepad, WinVim, and anything else available - later > you may find reason to look for a 'better' editor and there is always plenty > of opinion available about editors). There's a great list of editors with reviews at http://pureperl.org/edit

Re: absolute beginner has questions

2002-02-03 Thread Dave Benware
Thomas Kienberger wrote: > > Hallo, first: I´ve never programmed, bevore. > Now i want to start programming with perl. I´ve made the download of a standard perl >version for windows. And now I have no idea how to start with a first small programm. >I have bought a book about perl, but there i

Re: Question: Interpolation in Strings

2002-02-03 Thread Jenda Krynicky
From: "G. E." <[EMAIL PROTECTED]> > As I' ve read in "Programming Perl", double-quoted strings are subject > to variable interpolation of scalars and list values. Nothing else > interpolates. So the following perl code won't compile: > > $st = "!--- &get_header("Users")---

Re: absolute beginner has questions

2002-02-03 Thread Dave K
Thomas, Any editor (I use notepad, WinVim, and anything else available - later you may find reason to look for a 'better' editor and there is always plenty of opinion available about editors). With windows, you can set a file extension association by clicking in My Computer, View, Options.

why shift @_ ?

2002-02-03 Thread david wright
I have seen Ex #1 "corrected" (as being more well written) to Ex #2. In this case it is just being passed a $ but the data being passed was irrelevant. (though not a ref) I still don't see why, i guess i don't fully understand "shift". Any light shedder's appreciated, thanks : -) EX #1: sub ma

RE: absolute beginner has questions

2002-02-03 Thread Steve Howard
You need to install Perl (if you haven't). If you're on Windows, and have never programmed before, hopefully, you have downloaded Activestate's binaries, - they have an MSI to install everything. If you install using Activestate's MSI file, .pl will already be associated with the perl.exe program

absolute beginner has questions

2002-02-03 Thread Thomas Kienberger
Hallo, first: I´ve never programmed, bevore. Now i want to start programming with perl. I´ve made the download of a standard perl version for windows. And now I have no idea how to start with a first small programm. I have bought a book about perl, but there is no describtion of how to start. Do

RE: one question to end the day on . . .

2002-02-03 Thread Steve Howard
In the above example i had to escape the quotes to use them. There's nothing wrong with escaping quotes, but Perl has enough quote notations that it is almost never a "have to" to escape them. You could define your variables like this: my $bilbo = qq{Bilbo,"Why I like rings" Freemont Press, 19

Re: is false self-evident? [was Re: Perl trainer requests beginner help]

2002-02-03 Thread Andrea Holstein
In article <[EMAIL PROTECTED]> wrote "John W. Krahn" <[EMAIL PROTECTED]>: > print q("0e0" is ), "0e0" ? "TRUE" : "FALSE"; > print q( 0e0 is ), 0e0 ? "TRUE" : "FALSE"; > ' > "0e0" is TRUE > 0e0 is FALSE Even without floats, there's a curious behaviour: > print q("00" is ), "00" ? "TRUE" : "FA

RE: quick sort --help me

2002-02-03 Thread Andrea Holstein
In article <2E4528861499D41199D200A0C9B15BC031B7E8@FRISTX> wrote "Bob Showalter" <[EMAIL PROTECTED]>: > Note that the assignment is seen as a term in the list supplied to print, so it will >be executed > *before* the prompt is printed. To make the comma into a sequence operator, you >need to ad