Re: Conditionally use

2010-06-15 Thread Uri Guttman
>writes: > Thanks Uri > Another helpful person pointed me in the direction of > use if(!$LINUX),"Spreadsheet::WriteExcel"; > Which also appears to work. that is the if pragma which peter scott mentioned. i would use the require technique as it is less intrusive IMO. but choose you

Re: Conditionally use

2010-06-14 Thread Peter Scott
On Mon, 14 Jun 2010 11:23:34 -0700, kenTk wrote: > How can I conditionally use a module? perldoc if -- Peter Scott http://www.perlmedic.com/ http://www.perldebugged.com/ http://www.informit.com/store/product.aspx?isbn=0137001274 http://www.oreillyschool.com/courses/perl1/ --

Re: Conditionally use

2010-06-14 Thread Uri Guttman
>>>>> "k" == kenTk writes: k> How can I conditionally use a module? you normally can't but you don't need to call use here. k> I haven't found an xl module for Linux so I will simple omit that k> function and produce only the CSV. k>

Conditionally use

2010-06-14 Thread kenTk
How can I conditionally use a module? I have a script that I wish to run on Linux and Windows (activestate 5.8.8). Under windows it will produce an xl spreadsheet and a comma-separated text file. I haven't found an xl module for Linux so I will simple omit that function and produce only th