Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change

Re: Re: Re: push

by arturo (Vicar)
on Jan 31, 2001 at 00:09 UTC ( #55330=note: print w/replies, xml ) Need Help??

in reply to Re: Re: push
in thread push

If you may have more than one value that you want to save, I'd use an array of (references to) hashes; at least, sticking with the structure you've already got. For that, you're going to need to read up on references, so perldoc perlref and perldoc perlreftut are your starting points. something like the following should get you started:

my @lines; # ... as before # instead of *your* push line, @facdata{@facfields} = @facrow; push @lines, \%facdata;

That will leave you with an array of references to hashes. This is a little hairier than the structure you might want (you could, e.g. just store an array of strings, and call the splits on those later. But whatever ...)

Philosophy can be made out of anything. Or less -- Jerry A. Fodor

Replies are listed 'Best First'.
Re: Re: Re: Re: push
by malaga (Pilgrim) on Jan 31, 2001 at 00:17 UTC
    thanks...i'll try again.
Re: Re: Re: Re: push
by malaga (Pilgrim) on Jan 31, 2001 at 04:15 UTC
    i tried it that way and i get an error that it needs an explicit package. do you know which pm it might need?
      That error just means that you're running with use strict and have an undeclared variable.


      Global symbol "%s" requires explicit package name (F) You've said "use strict vars", which indicates that all variables must either be lexically scoped (using "my"), or explicitly qualified to say which package the global variable is in (using "::").
      Odd that the explanation doesn't mention use vars, though...

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://55330]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (7)
As of 2022-01-22 21:51 GMT
Find Nodes?
    Voting Booth?
    In 2022, my preferred method to securely store passwords is:

    Results (63 votes). Check out past polls.