On Friday, May 24, 2002, at 07:44 , William West wrote:
> goodmorning (or evening, or what have you) I'll have mine neat, in a clean class, thank you. I believe you want $/ cf perldoc perlvar " $INPUT_RECORD_SEPARATOR $RS $/ The input record separator, newline by default. This influences Perl's idea of what a "line" is. " but that also means that you will want to set it to something other than '\n' prior to the while loop.... > sub get_list{ > my($inputfilehandal)=@_; > open (IN,"$inputfilehandal"); > while(<IN>){ #if i could seperate each instance of IN with > #something other than /n > > push(@firstarray,$_);} > > close (IN); > } > ----- three niggling details - a) like the idea that you are passing in $fileName but isn't it really a $fileName or $file_name and not a 'filehandle' - trust me, when you start reading this with [bi|tri|progressives] lenses those little details will be important b) you might want to pass in a reference to the array - and fill it up push( @$array_ref, $_ ) c) return your array - vice use the side effect - in lieu of taking in the ref to an array sub get_list{ my($inputfilehandal)=@_; my @ret_Array; open (IN,"$inputfilehandal"); $/ = 'KlorthoTheMagificientRules'; while(<IN>){ #if i could seperate each instance of IN with #something other than /n push(@ret_Array,$_); } close (IN); return(@ret_Array); } # end sub get_list Perlsonally I am always fearful about putting Klortho into kode - you never know what will happen.... but you could do that with a reference to a byte value - hence that your reads would be in $KlorthoTheMagificientRules number of bytes.... ciao drieux --- -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]