in reply to Re: Re: using arrays insteaed of files
in thread using arrays insteaed of files

You say: "But no data ever seems to be there."

What do you mean by "there"? All of the commands shown will put something into the variable $database if @names had something in it to begin with.

The statement: my $database = "test.dbf"; looks like you were previously assigning a filename to $database. And that filename was then being passed to test(). Is that the case? If so, a routine expecting a filename is not going to do well if passed a string containing data instead.

You seem to be at a beginning level so we will be much more able to help you if you tell us more specifically what you are doing and what you are asking for:

NOTE: What often happens when you force yourself to *demonstrate* your problem to us instead of just reporting things like "it doesn't work" or "nothing was there" is that, in carefully laying out the specifics of your attempts you discover the solution for yourself. It's a good discipline.

P.S. Good work on using "my". Is there a "use strict" at the top of your script also? And are you using warnings?

"Perl is a mess and that's good because the
problem space is also a mess.
" - Larry Wall

  • Comment on Re: Re: Re: using arrays insteaed of files