On 11-03-04 11:14 AM, Téssio Fechine wrote:
        my ( $file, $dir, $sufix ) = fileparse( $item, %sufixTable );

I don't think fileparse takes a hash as the final arguments. It would be converted to an array and both the keys and the values used.

Also, from `perldoc File::basename`:

If @suffixes are given each element is a pattern (either a string or a "qr//") matched against the end of the $filename. The matching portion is removed and becomes the $suffix.

That mean all the periods in the hash will match any character.

Try:

my @sufixTable = ( '\\.div', '\\.tex', '\\.o', '\\.c', '\\.a', );


--
Just my 0.00000002 million dollars worth,
  Shawn

Confusion is the first step of understanding.

Programming is as much about organization and communication
as it is about coding.

The secret to great software:  Fail early & often.

Eliminate software piracy:  use only FLOSS.

--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to