Gossamer Forum
Home : General : Perl Programming :

Invalid argument

Quote Reply
Invalid argument
Anyone got any idea as to why I'm getting an "Invalid argument" error with the following code?

open(DATAOUT,"<./data/Accreditation/accrediting.csv") || die "Cant open file. Reason: $!";

The full error is;

Cant open file. Reason: Invalid argument at C:\..\research_import.cgi line 13.

I'm confused Unsure

TIA

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] Invalid argument In reply to
Just a SWAG (scientific wild ass guess) but try replacing the || with "or".

May not help, but you never know... or make sure the directory name is not supposed to be capitalized (accred... vs. Accred...)

Last edited by:

Watts: Nov 21, 2003, 7:16 AM
Quote Reply
Re: [Watts] Invalid argument In reply to
I ended up taking another approach. Took the open() stuff out, used __DATA__ and defined the data at the bottom of the page. I then sliced the <DATA> up into lines,and did a foreach() loop on it. That didn't seem to give any errors Smile

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!