replacing an element in an array

2001-04-27 Thread Kaustav Bhattacharya
Am rather a beginner at perl and was wondering how to do the following. I've read in a text file containing a list of file paths. the list is read in to an array. I want to scan through the whole array and remove all lines with end as .txt and .scc. i.e remove that element in the array. My file

traversing dir tree and reading in files

2001-05-01 Thread Kaustav Bhattacharya
, but I can't work out how to list only files which contain "_boot.js" in the file name. I only want those files and none of the others.and how would I put each line outputted in to an array? Do a "foreach" and "push" each item in to the array as it's

RE: IF statements

2001-05-01 Thread Kaustav Bhattacharya
Mark, I only recently started coding in PERL so don't take the following as official. There is no CASE statement in PERL. Instead you use something called SWITCH. The O'Reilly book has an example of how to use the SWITCH statement. Kaustav > -Original Message- > From: Mark Martin [mail

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";