Re: writing an array to file

2001-05-01 Thread Sean O'Leary
At 12:28 PM 5/1/2001, you wrote: >sub wanted { > @FILES = (); > if ( $File::Find::name =~ /_boot\.js$/ ) > { >push @FILES, "$File::Find::name\n"; > } > > print (@FILES); > > open(BOOT_FILES,">boot_files.txt"); >

Re: writing an array to file

2001-05-01 Thread Paul
--- Kaustav Bhattacharya <[EMAIL PROTECTED]> wrote: > I have an array populated with data, I want to dump its content to > file but > my following code is not writing any data out! HELP: > > sub wanted { > @FILES = (); > if ( $File::Find::name =~ /_boot\.js$/ ) > { >

Re: writing an array to file

2001-05-01 Thread Stephen P. Potter
Lightning flashed, thunder crashed and "Kaustav Bhattacharya" whispered: | open(BOOT_FILES,">boot_files.txt"); | print BOOT_FILES @FILES; | close BOOT_FILES; You should always check the return of open and close... open BOOT_FILES, ">boot_files.txt" or die "Can't open boot_file

writing an array to file

2001-05-01 Thread Kaustav Bhattacharya
I have an array populated with data, I want to dump its content to file but my following code is not writing any data out! HELP: sub wanted { @FILES = (); if ( $File::Find::name =~ /_boot\.js$/ ) { push @FILES, "$File::Find::name\n";