Re: what's the advantage of ORM?

2011-01-10 Thread Octavian Rasnita
From: "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. With an ORM you can do the same things as with DBI directly (because the Perl ORMS finally use DBI to ac

RE: 1st line of perl script

2011-01-10 Thread Sunita Rani Pradhan
On Mon, Jan 10, 2011 at 11:21 AM, Shawn H Corey wrote: > It isn't used if you start your scripts from Windows. It worked for me earlier: On Mon, Jan 10, 2011 at 10:43 AM, Brandon McCaig wrote: > I just tested with Strawberry Perl v5.12.1 in Windows XP with the > following code: > > #!/usr/bin/

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: 1st line of perl script

2011-01-10 Thread Octavian Rasnita
From: "Bob McConnell" It doesn't, the line starts with a '#' so it is ignored. You have to tell MS-Windows to associate .pl files with perl.exe. Then the OS does what #! was supposed to. But it will always use the same copy of perl.exe, so you don't get the ability to use different releases fo

Re: 1st line of perl script

2011-01-10 Thread Octavian Rasnita
From: "Shawn H Corey" > On 11-01-10 10:21 AM, Sunita Rani Pradhan wrote: >> Yes I can use that . Does this -w option works on windows or not ? > > I do believe so but if you `use warnings;` you can turn it off. You > can't do that with -w. > > use warnings; > > { > no warnings; > # some c

Re: 1st line of perl script

2011-01-10 Thread Octavian Rasnita
From: "Sunita Rani Pradhan" > We have -w option for warnings which we specify with the 1st line . How > does it work on windows ? > > -Sunita Yes it works under Windows, but is recommended to not use it anymore. It is better to use (under any OS) instead: use warnings; Because later in some

Re: 1st line of perl script

2011-01-10 Thread Brandon McCaig
On Mon, Jan 10, 2011 at 11:39 AM, Shawn H Corey wrote: > It's the Perl interpreter that looks up the switches on the shebang line, > not Windows. That's what I've been saying... -- Brandon McCaig V zrna gur orfg jvgu jung V fnl. Vg qbrfa'g nyjnlf fbhaq gung jnl. Casto

Re: 1st line of perl script

2011-01-10 Thread Shawn H Corey
On 11-01-10 11:29 AM, Brandon McCaig wrote: Invoked like: perl test.pl If I remove the -w from the shebang line then no warning is output. Unless I'm misunderstanding you... It's the Perl interpreter that looks up the switches on the shebang line, not Windows. -- Just my 0.0002 million

Re: 1st line of perl script

2011-01-10 Thread Shawn H Corey
On 11-01-10 11:34 AM, Bob McConnell wrote: And I repeat, it doesn't. Windows looks up the association you defined and then goes through the %PATH% in your environment looking for the first perl.exe it can find. It doesn't even read the file, but passes it as a parameter to perl.exe. At that point

RE: 1st line of perl script

2011-01-10 Thread Bob McConnell
And I repeat, it doesn't. Windows looks up the association you defined and then goes through the %PATH% in your environment looking for the first perl.exe it can find. It doesn't even read the file, but passes it as a parameter to perl.exe. At that point, it is up to the Perl interpreter to decide

Re: 1st line of perl script

2011-01-10 Thread Brandon McCaig
On Mon, Jan 10, 2011 at 11:21 AM, Shawn H Corey wrote: > It isn't used if you start your scripts from Windows. It worked for me earlier: On Mon, Jan 10, 2011 at 10:43 AM, Brandon McCaig wrote: > I just tested with Strawberry Perl v5.12.1 in Windows XP with the > following code: > > #!/usr/bin/p

Re: 1st line of perl script

2011-01-10 Thread Shawn H Corey
On 11-01-10 11:15 AM, Brandon McCaig wrote: On Mon, Jan 10, 2011 at 11:07 AM, Shawn H Corey wrote: However, some web servers read the the shebang line and executes what it says. So, you should change any Perl CGIs to point to the perl program. It isn't used to determine the interpreter on Wi

Re: 1st line of perl script

2011-01-10 Thread Brandon McCaig
On Mon, Jan 10, 2011 at 11:07 AM, Shawn H Corey wrote: > It doesn't.  At least, it doesn't if you start the script from Windows. >  What Windows does is look up the extension, *.pl, in the Registry and > launch the program associated with it.  When it starts, perl will check the > first line for a

Re: 1st line of perl script

2011-01-10 Thread Shawn H Corey
On 11-01-10 10:57 AM, Sunita Rani Pradhan wrote: Yes I agree . Then I am coming back to my 1st question . This path does not exist on windows "/usr/bin/perl " , how it works ? It doesn't. At least, it doesn't if you start the script from Windows. What Windows does is look up the extension,

RE: 1st line of perl script

2011-01-10 Thread Bob McConnell
It doesn't, the line starts with a '#' so it is ignored. You have to tell MS-Windows to associate .pl files with perl.exe. Then the OS does what #! was supposed to. But it will always use the same copy of perl.exe, so you don't get the ability to use different releases for different scripts. Bo

RE: 1st line of perl script

2011-01-10 Thread Sunita Rani Pradhan
Yes I agree . Then I am coming back to my 1st question . This path does not exist on windows "/usr/bin/perl " , how it works ? Thanks Sunita -Original Message- From: Brandon McCaig [mailto:bamcc...@gmail.com] Sent: Monday, January 10, 2011 9:14 PM To: Shawn H Corey Cc: beginners@perl.o

Re: 1st line of perl script

2011-01-10 Thread Brandon McCaig
On Mon, Jan 10, 2011 at 10:32 AM, Shawn H Corey wrote: > I do believe so but if you `use warnings;` you can turn it off.  You can't > do that with -w. I just tested with Strawberry Perl v5.12.1 in Windows XP with the following code: #!/usr/bin/perl -w my @a; my $b = @a[0]; __END__ When run, I

Re: 1st line of perl script

2011-01-10 Thread Shawn H Corey
On 11-01-10 10:21 AM, Sunita Rani Pradhan wrote: Yes I can use that . Does this -w option works on windows or not ? I do believe so but if you `use warnings;` you can turn it off. You can't do that with -w. use warnings; { no warnings; # some code } -- Just my 0.0002 million doll

RE: 1st line of perl script

2011-01-10 Thread Sunita Rani Pradhan
Yes I can use that . Does this -w option works on windows or not ? -Original Message- From: Christian Marquardt [mailto:christian.marqua...@trivadis.com] Sent: Monday, January 10, 2011 6:22 PM To: Sunita Rani Pradhan; Donald Calloway; beginners@perl.org Subject: Re: 1st line of perl scrip

Re: calculate average

2011-01-10 Thread John Delacour
At 18:16 -0800 07/01/2011, S.F. wrote: I have a data file with n columns and r row. The first 3 columns and the first 5 rows are: 2 3 1 1 6 X 4 0 X X 8 X 5 X 5 The "X" means missing. How could I write a script to calculate the average by column and replace "X" with the average? There must be

Re: calculate average

2011-01-10 Thread Brandon McCaig
On Fri, Jan 7, 2011 at 9:16 PM, S.F. wrote: > I have a data file with n columns and r row. > The first 3 columns and the first 5 rows are: > > 2 3 1 > 1 6 X > 4 0 X > X 8 X > 5 X 5 > > The "X" means missing. > How could I write a script to calculate the average by column and > replace "X" with the

Re: 1st line of perl script

2011-01-10 Thread Christian Marquardt
Maybe you can use "use warnings;" for this ... Best regards Christian Am 10.01.11 13:49 schrieb "Sunita Rani Pradhan" unter : >We have -w option for warnings which we specify with the 1st line . How >does it work on windows ? > >-Sunita > >-Original Message- >From: Donald Calloway [m

RE: 1st line of perl script

2011-01-10 Thread Sunita Rani Pradhan
We have -w option for warnings which we specify with the 1st line . How does it work on windows ? -Sunita -Original Message- From: Donald Calloway [mailto:donald.callo...@gmail.com] Sent: Sunday, January 09, 2011 6:42 PM To: beginners@perl.org Subject: Re: 1st line of perl script I thi

Re: IPC::Shareable issue

2011-01-10 Thread Michiel Beijen
Hi, I guess you should not really use IPC::Shareable, it's last release was ages ago. It does not succeed tests on a 5.10.x perl: https://rt.cpan.org/Public/Bug/Display.html?id=41401 - and I guess the patch in this bug report will get it working for you again. I guess it would be worthwile findin

Re: 1st line of perl script

2011-01-10 Thread Donald Calloway
I think there is no error thrown by Windows (or any other architecture) because this line is never compiled because of the # in front which signifies the line as comments. On Tue, 04 Jan 2011 00:33:18 -0500, Sunita Rani Pradhan wrote: Hi All Perl script works without the