On Jan 23, 2007, at 8:22 AM, Saravana Kumar wrote:
Hi list,
I am trying to remove the extension from the a list of filenames and
manipulate the names further.
Tried to doing this:
$file=~ s/\..*//;
The above works fine. I get the result 'filename' if the filename is
filename.ext.
There are
Saravana Kumar wrote:
shaick mohamed wrote:
On 1/23/07, Saravana Kumar [EMAIL PROTECTED] wrote:
I am trying to remove the extension from the a list of filenames and
manipulate the names further.
Tried to doing this:
$file=~ s/\..*//;
The above works fine. I get the result 'filename' if
On 2007/01/23, at 11:03, Rob Dixon wrote:
$file =~ s/(.*)\./$1/;
or
$file =~ s/\.[^.]*$//;
If you know the suffix of the files you're working on, you can use
the File::Basename module, more specific the fileparse function:
use File::Basename;
my @suffix = qw(.txt .zip .doc);
my
See our posting at http://jobs.perl.org/job/5243
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/
On 1/22/07, Jeff Peng [EMAIL PROTECTED] wrote:
I just need Perl core and CGI.pm to be installed on my
host.How can I do it?thanks.
I'm using RedHat Linux
The standard installation instructions should work for you. Look for
the file called INSTALL in the source distribution. Hope this
On Mon, 2007-01-22 at 20:09 -0800, Jeff Peng wrote:
It depends on what operating system you are using on
your host.
HI,
I'm using RedHat Linux (AS4) of 2.6 kernel.Thanks.
I'm not experienced with Red Hat, but I'd bet it already contains Perl
core and CGI.pm.
Otherwise, find CGI at
Here is a snippet of the code:
my $MyFileHand;
my $MyFileHand1;
open($MyFileHand,$MyFileIn) || diet (3, $MyFileIn, $!);
open($MyFileHand1,$MyFileIn1) || diet (3, $MyFileIn1, $!);
proc_getrcd( $MyFileHand , $MyEOFProd,
On 1/23/07, Wagner, David --- Senior Programmer Analyst --- WGO
[EMAIL PROTECTED] wrote:
$MyData =~ s/[[:cntrl:]]/ /g if ( $MyData =~ /[[:cntrl:]]/ );
Why the if clause?
I'm not sure I understand your difficulty. But it sounds as if you're
not using seek() (or something similar) to get
I am just trying to read text files which are delimited by a
regular end of line. I usually only read one file at a time, but thought
it should not be that big a thing to have two file handles open and pass
the filehandle to the sub.
Can I not ready two different text files at the
On 1/23/07, Wagner, David --- Senior Programmer Analyst --- WGO
[EMAIL PROTECTED] wrote:
I am just trying to read text files which are delimited by a
regular end of line. I usually only read one file at a time, but thought
it should not be that big a thing to have two file handles open
It is two different files. Sub1 and sub2 read from 1 file for 10
rcds and then closes the files and goes on to the next sub? If I have
two different filehandles pointing at two different files, why would I
have to do a seek? I am just trying to read two text files at the same
time and
Sorry, but it was a logic problem and onthing else.
I apologize for missing it, but I did.
If you have any problems or questions, please let me know.
Thanks.
Wags ;)
David R Wagner
Senior Programmer Analyst
FedEx Freight
1.408.323.4225x2224 TEL
1.408.323.4449
Igor Sutton Lopes wrote:
On 2007/01/23, at 11:03, Rob Dixon wrote:
$file =~ s/(.*)\./$1/;
or
$file =~ s/\.[^.]*$//;
If you know the suffix of the files you're working on, you can use the
File::Basename module, more specific the fileparse function:
use File::Basename;
my
I'm not experienced with Red Hat, but I'd bet it
already contains Perl
core and CGI.pm.
Sorry,I mean I only need Perl core and CGI.pm to be
installed on my host,other modules are excluded.
Cheap talk?
Hi,
I have a directory which contains several files.
client1-2006-05-19.log.gz
client1-2006-05-20.log.gz
client1-2006-07-29.log.gz
client1-2006-10-05.log.gz
client1-2006-05-21.log.gz
I want strip all of axisglobal- in their filenames.
What I did was:
#!/usr/bin/perl
use warnings;
use
Michael Alipio wrote:
Hi,
Hello,
I have a directory which contains several files.
client1-2006-05-19.log.gz
client1-2006-05-20.log.gz
client1-2006-07-29.log.gz
client1-2006-10-05.log.gz
client1-2006-05-21.log.gz
I want strip all of axisglobal- in their filenames.
What I did
- Original Message
From: John W. Krahn [EMAIL PROTECTED]
To: Perl Beginners beginners@perl.org
Sent: Wednesday, January 24, 2007 10:57:51 AM
Subject: Re: trouble with list context assignment for substitution inside
File::Find wanted function
Yes, the substitution operator (s///)
Do you have a perl one-liner to rename all files into their
filenames with stripped ^\w+.
No.
Yes.
/^\w+-/ and rename $_, $' for (glob *)
-Jason
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/
I found an example using getopt on the web and I am trying to convert it to
my use. Everything works except the last part. What am attempting to do is
create a script which I can pass switches as arguments. Eventually this
script will replace the rm command on my linux server, so that I can
Saravana Kumar schreef:
I am trying to remove the extension from the a list of filenames and
manipulate the names further.
Tried to doing this:
$file=~ s/\..*//;
The above works fine. I get the result 'filename' if the filename is
filename.ext.
There are some files whose names are
20 matches
Mail list logo