Re: File::Basename problem

2011-03-04 Thread Rob Dixon
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 r

Re: File::Basename problem

2011-03-04 Thread Téssio Fechine
Thanks for the help! > De: Shawn H Corey > Assunto: Re: File::Basename problem > Para: beginners@perl.org > Data: Sexta-feira, 4 de Março de 2011, 13:22 > On 11-03-04 11:14 AM, Téssio Fechine > wrote: > >     my ( $file, $dir, $sufix ) = > fileparse( $item, %sufixTable );

Re: File::Basename problem

2011-03-04 Thread Shawn H Corey
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`

File::Basename problem

2011-03-04 Thread Téssio Fechine
Hello! I'm trying to use File::Basename, but it is not behaving well: tessio@pacman:~/tmp/ASAP$ ls book.div book.tex erotic.div erotic.tex erotyc.tex problem source.a source.c source.o tessio@pacman:~/tmp/ASAP$ cat problem use 5.010; use strict; use warnings; use File::Bas

Re: File::Basename issues

2007-04-28 Thread Ken Foskey
On Fri, 2007-04-27 at 11:16 -0700, Nishi wrote: > Yes, its the cygwin perl to be blamed. > Would setting the ACTIVESTATE environment variable help? before running the > scripts that contain the basename usage? Cygwin is a Unix environment emulated in Windows. Paths on Unix are done by slash eg /

Re: File::Basename issues

2007-04-27 Thread Nishi
Yes, its the cygwin perl to be blamed. Would setting the ACTIVESTATE environment variable help? before running the scripts that contain the basename usage? Thanks, Nishi. On 4/26/07, Ken Foskey <[EMAIL PROTECTED]> wrote: On Wed, 2007-04-25 at 17:15 -0700, Nishi wrote: > Hi: >

Re: File::Basename issues

2007-04-26 Thread Ken Foskey
On Wed, 2007-04-25 at 17:15 -0700, Nishi wrote: > Hi: > > The File::Basename from 5.8.0 doesnot work in Perl 5.8.2 or Perl 5.8.7. Is > there any particular reason. Are yhou using activestate or cygwin perl. cygwin will do that because the filename you provided is not a cygwin filena

Re: File::Basename issues

2007-04-25 Thread Chas Owens
On 4/25/07, Nishi <[EMAIL PROTECTED]> wrote: Hi: The File::Basename from 5.8.0 doesnot work in Perl 5.8.2 or Perl 5.8.7. Is there any particular reason. I have a script that uses the Basename module was running file with 5.8.0, but it doesnt work fine when i run the script in Perl 5.8.2 o

File::Basename issues

2007-04-25 Thread Nishi
Hi: The File::Basename from 5.8.0 doesnot work in Perl 5.8.2 or Perl 5.8.7. Is there any particular reason. I have a script that uses the Basename module was running file with 5.8.0, but it doesnt work fine when i run the script in Perl 5.8.2 or Perl 5.8.7. I tried copying the basename.pm from

Re: File::Basename

2003-09-09 Thread Rob Dixon
Paul Kraus wrote: > > From how I understood it file::basename was able to tell figure out the > filename without path for both windows and UNIX. > I have an html page that has a form field for uploading a file. When I > hit the choose button it lets me pick something from my direc

File::Basename

2003-09-09 Thread Paul Kraus
>From how I understood it file::basename was able to tell figure out the filename without path for both windows and UNIX. I have an html page that has a form field for uploading a file. When I hit the choose button it lets me pick something from my directory. Now the filename it returns is

Re: FILE::BASENAME

2002-04-13 Thread eric-sourceforge
On Fri, 12 Apr 2002, Green, Chris wrote: > use FILE::BASENAME > > $record = "D:\\data\\filename.bat"; > > ($name,$path,$suffix) = fileparse($record,@suffixlist); > $basename = basename($record,@suffixlist); > $dirname = dirname($record); Chris: 1.

Re: FILE::BASENAME

2002-04-12 Thread John W. Krahn
Chris Green wrote: > > I'm having problems using FILE::BASENAME and the fileparse command. I've > used the code below to try it out but get an error message saying 'Undefined > subroutine &main::fileparse called at D:\data\parse.pl line 6' > > use FILE:

Re: FILE::BASENAME

2002-04-12 Thread p
Chris, I think perhaps a mising semi-colon and case problems could be to blame. Try use File::Basename; #observe case Because on a unix system FILE/BASENAME and File/Basename are different. Tristan You Wrote: -- I'm having problems using FILE::BASENAME and the fileparse co

FILE::BASENAME

2002-04-12 Thread Green, Chris
I'm having problems using FILE::BASENAME and the fileparse command. I've used the code below to try it out but get an error message saying 'Undefined subroutine &main::fileparse called at D:\data\parse.pl line 6' use FILE::BASENAME $record = "D:\\data\\filename.ba

Re: File::Basename, linux, and extensions

2002-01-12 Thread Michael Fowler
On Fri, Jan 11, 2002 at 07:16:29AM -0500, zentara wrote: > I've been playing with File::Basename and > the docs are not absolutely clear on whether > you can get an extension on a linux system. > I have had no success trying, so does this mean > that linux is not cap

Re: File::Basename, linux, and extensions

2002-01-11 Thread Sudarsan Raghavan
zentara wrote: > On Fri, 11 Jan 2002 04:39:05 -0800, [EMAIL PROTECTED] (John W. Krahn) wrote: > > >Zentara wrote: > > > >> I've been playing with File::Basename and > >> the docs are not absolutely clear on whether > >> you can get an exten

Re: File::Basename, linux, and extensions

2002-01-11 Thread zentara
On Fri, 11 Jan 2002 04:39:05 -0800, [EMAIL PROTECTED] (John W. Krahn) wrote: >Zentara wrote: > >> I've been playing with File::Basename and >> the docs are not absolutely clear on whether >> you can get an extension on a linux system. >> I have had no succes

Re: File::Basename, linux, and extensions

2002-01-11 Thread John W. Krahn
Zentara wrote: > > Hi, Hello, > I've been playing with File::Basename and > the docs are not absolutely clear on whether > you can get an extension on a linux system. > I have had no success trying, so does this mean > that linux is not capable of dealing with exte

File::Basename, linux, and extensions

2002-01-11 Thread zentara
Hi, I've been playing with File::Basename and the docs are not absolutely clear on whether you can get an extension on a linux system. I have had no success trying, so does this mean that linux is not capable of dealing with extensions? As an example from perldoc File::bas

Re: File::Basename fileparse adding current path

2001-12-19 Thread Michael Fowler
On Thu, Dec 13, 2001 at 06:13:05PM -0500, Thomas A. Lowery wrote: [snip] > "You are guaranteed that if you concatenate path, name, > and suffix together in that order, the result will > denote the same file as the input file specification." [snip] >

File::Basename fileparse adding current path

2001-12-13 Thread Thomas A . Lowery
Hello All, Working on a "load" type function for sql files. This is a quote from perldoc File::Basename "You are guaranteed that if you concatenate path, name, and suffix together in that order, the result will

RE: File::Basename Under W98

2001-09-27 Thread Bob Showalter
> -Original Message- > From: Crowder, Rod [mailto:[EMAIL PROTECTED]] > Sent: Thursday, September 27, 2001 5:37 AM > To: Perl Beginners List (E-mail) > Subject: File::Basename Under W98 > > > I am trying to use the File::Basename module to strip off the >

File::Basename Under W98

2001-09-27 Thread Crowder, Rod
I am trying to use the File::Basename module to strip off the suffix of a file, and use the base with different suffixes for output and log files. if I Give the file name "XYZData.txt", Basename returns the full name not the "XYZData" string, leaving me with a log file &q