vrao has asked for the wisdom of the Perl Monks concerning the following question:

Hi monks , As iam new for perl, will you suggest how to read hash or array from one file(x.pl) into another (y.pl) file ,as i want to read some hash in X.pl from Y.pl and do some manupaltion. Get me soon. rao..
  • Comment on Howt to read an array from some other file.

Replies are listed 'Best First'.
Re: Howt to read an array from some other file.
by Zaxo (Archbishop) on May 20, 2004 at 09:22 UTC
      thanks i got it using Data:Dumper
Re: Howt to read an array from some other file.
by monkey_boy (Priest) on May 20, 2004 at 10:43 UTC
    You could try:
    In x.pl:
    require y.pl;

    The hash should then be available, however i dont think this is a good way to write code, if you need scripts to access common data or methods , put them in a module.
    I should really do something about this apathy ... but i just cant be bothered