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


IMPORTANT: I've now moved to ultranerds.co.uk, and the .com will no longer work!
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package (plugins total "value" $3,325 & rising, for just $350)| GLinks ULTRA Package PRO (plugins total "value" $5,625 & rising, for just $500)
Support Forum | Links SQL Plugins | DMOZ Dumps | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Compare our different Plugin packages *new* Free CSS Templates
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


IMPORTANT: I've now moved to ultranerds.co.uk, and the .com will no longer work!
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package (plugins total "value" $3,325 & rising, for just $350)| GLinks ULTRA Package PRO (plugins total "value" $5,625 & rising, for just $500)
Support Forum | Links SQL Plugins | DMOZ Dumps | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Compare our different Plugin packages *new* Free CSS Templates