From: Tony Esposito <[EMAIL PROTECTED]> > I can resolve a constant in a print statement like so: > > use constant QX12_FILE => "q_x12_in.dat"; > ... > print STDERR "could not change permissions on file @{[ QX12_FILE ]}: > $!"; > > but how to resolve the constant when being used in a function call, > like so: > > use constant QX12_FILE => "q_x12_in.dat"; > ... > rename(@{[ QX12_FILE ]}, "foo.dat"); > > The print() works - resolves - ok....the rename() does not. I assume > it has something to do with the syntax of @{[ QX12_FILE ]}.
You are doing it unnecessarily complex. rename( QX12_FILE, "foo.dat"); is enough. Jenda ===== [EMAIL PROTECTED] === http://Jenda.Krynicky.cz ===== When it comes to wine, women and song, wizards are allowed to get drunk and croon as much as they like. -- Terry Pratchett in Sourcery -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]