On 04 Oct 2013 06:33, Shlomi Fish wrote:
On 02 Oct 2013 Uri Guttman wrote:
On 02 Oct 2013 08:56 PM, Rob Dixon wrote:
On 03 Oct 2013 01:39, Uri Guttman wrote:
I do recommend you try to use File::Slurp to read in and write out your
files.
It would help a lot if you declared your interest in
On 10/05/2013 04:54 AM, Rob Dixon wrote:
Uri, I rarely see File::Slurp recommended other than by yourself.
usually it is in the context of a work-around for Perl's lack of support
for a regex version of $/. I have also never had occasion to use it
myself, despite a working understanding of its
Please take any further messages in this conversation off list. It's
off-topic, off-putting to newcomers, and generally boring and/or
aggravating for those of us that have seen it before.
Rob: there is no obligation for people to disclose that they wrote the
stuff they're advocating. Nobody has a
On Wed, Oct 2, 2013 at 5:10 PM, Peter Holsberg
pjh42atpobox@gmail.comwrote:
Charles DeRykus has written on 10/2/2013 5:49 PM:
Wouldn't a manual edit be easier... or is this a recurrent problem?
If recurrent, a messy solution may be possible but fragile unless
the html formatting is
Hi Uri,
On Wed, 02 Oct 2013 23:44:04 -0400
Uri Guttman u...@stemsystems.com wrote:
On 10/02/2013 08:56 PM, Rob Dixon wrote:
On 03/10/2013 01:39, Uri Guttman wrote:
I do recommend you try to use File::Slurp to read in and write out your
files.
It would help a lot if you declared your
Hi,
I have tried to do this for hours but it looks like it is just too
difficult for me.
I would like a script to open a file in the current directory and edit
it. The file's name is \d{6}.htm
The script then needs to search for a line that begins:
a class=nolinkunderline
and delete that line
On Wed, Oct 2, 2013 at 10:22 AM, Peter Holsberg
pjh42atpobox@gmail.com wrote:
Hi,
I have tried to do this for hours but it looks like it is just too
difficult for me.
You should maybe show the code you have, and we can help you with
that. If you've worked for hours, you must have
John SJ Anderson has written on 10/2/2013 1:45 PM:
On Wed, Oct 2, 2013 at 10:22 AM, Peter Holsberg
pjh42atpobox@gmail.com wrote:
Hi,
I have tried to do this for hours but it looks like it is just too
difficult for me.
You should maybe show the code you have, and we can help you with
On Wed, 02 Oct 2013 13:57:36 -0400
Peter Holsberg pjh42atpobox@gmail.com wrote:
blushing I was so upset that I deleted it all! It seems to me that
it should be fairly straightforward, but at 79, the old synapses
aren't firing quite as well as they used to.
Can you get me started?
Sure:
Shawn H Corey has written on 10/2/2013 2:29 PM:
On Wed, 02 Oct 2013 13:57:36 -0400
Peter Holsberg pjh42atpobox@gmail.com wrote:
blushing I was so upset that I deleted it all! It seems to me that
it should be fairly straightforward, but at 79, the old synapses
aren't firing quite as well
On Oct 2, 2013, at 10:22 AM, Peter Holsberg wrote:
Hi,
I have tried to do this for hours but it looks like it is just too
difficult for me.
I would like a script to open a file in the current directory and edit
it. The file's name is \d{6}.htm
That is an unusual name for a file. I
On Wed, 02 Oct 2013 15:44:56 -0400
Peter Holsberg pjh42atpobox@gmail.com wrote:
Why are you globbing *.htm?
See `perldoc -f glob` and `perldoc File::Glob`.
--
Don't stop where the ink does.
Shawn
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands,
On 02/10/2013 20:44, Peter Holsberg wrote:
Shawn H Corey has written on 10/2/2013 2:29 PM:
my @files = grep { /^\d{6}\.htm$/i } glob( '*.htm' );
Well, I'm more of a beginner than I thought I was!
The /i to grep is to ignore case?
Why are you globbing *.htm?
Hi Peter
All that Shawn has
On Wed, Oct 2, 2013 at 4:44 PM, Peter Holsberg
pjh42atpobox@gmail.comwrote:
Shawn H Corey has written on 10/2/2013 2:29 PM:
On Wed, 02 Oct 2013 13:57:36 -0400
Peter Holsberg pjh42atpobox@gmail.com wrote:
blushing I was so upset that I deleted it all! It seems to me that
it
On Wed, 02 Oct 2013 23:43:40 +0100
Rob Dixon rob.di...@gmx.com wrote:
The file's name is \d{6}.htm
do you mean that literal name, or do you want to include *.htm files
that start with six decimal digits? Jim Gibson has assumed the former,
while Shawn, the latter.
It would be difficult
On Wed, Oct 2, 2013 at 8:19 PM, Shawn H Corey shawnhco...@gmail.com wrote:
On Wed, 02 Oct 2013 23:43:40 +0100
Rob Dixon rob.di...@gmx.com wrote:
The file's name is \d{6}.htm
do you mean that literal name, or do you want to include *.htm files
that start with six decimal digits? Jim
sigh Let me start over.
The file I want to modify has a 6-digit filename and an extension htm.
For example, 131002.htm
I'm working in Windows, with Strawberry perl, with Randall L. Schwartz's
Learning Perl, copyright 1993. I also have Perl 5 Pocket Reference,
1998 and copies of Programming Perl
On 10/02/2013 07:19 PM, Shawn H Corey wrote:
On Wed, 02 Oct 2013 23:43:40 +0100
Rob Dixon rob.di...@gmx.com wrote:
The file's name is \d{6}.htm
do you mean that literal name, or do you want to include *.htm files
that start with six decimal digits? Jim Gibson has assumed the former,
while
On 10/02/2013 08:02 PM, Peter Holsberg wrote:
sigh Let me start over.
The file I want to modify has a 6-digit filename and an extension htm.
For example, 131002.htm
i figured that was the case. you should state that in the beginning and
then say a regex to match that is \d{6}\.htm. then you
Uri Guttman has written on 10/2/2013 8:39 PM:
On 10/02/2013 08:02 PM, Peter Holsberg wrote:
sigh Let me start over.
The file I want to modify has a 6-digit filename and an extension htm.
For example, 131002.htm
i figured that was the case. you should state that in the beginning and
then
On 03/10/2013 00:19, Shawn H Corey wrote:
It would be difficult to get a file with a backslash in it.
perl -e open X, q/\d{6}.htm/
Rob
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/
On 03/10/2013 01:39, Uri Guttman wrote:
I do recommend you try to use File::Slurp to read in and write out your
files.
It would help a lot if you declared your interest in File::Slurp. It is
disingenuous to recommend your own modules.
Rob
--
To unsubscribe, e-mail:
On 02/10/2013 18:22, Peter Holsberg wrote:
Hi,
I have tried to do this for hours but it looks like it is just too
difficult for me.
I would like a script to open a file in the current directory and edit
it. The file's name is \d{6}.htm
The script then needs to search for a line that begins:
That should read as follows:
use strict;
use warnings;
use Tie::File;
use File::Copy 'copy';
use File::Spec;
my $dir = '/path/to/my/directory';
opendir my ($dh), $dir;
# Find all files in the directory that match \d{6}\.htm
# Die if none or multiple files found
#
my @files = grep
On 10/02/2013 08:44 PM, Peter Holsberg wrote:
Uri Guttman has written on 10/2/2013 8:39 PM:
use File::Slurp qw( read_dir edit_file ) ;
foreach my $file ( grep /^\d{6}\.htm$/, read_dir( $dir ) ) {
edit_file { s/foo/bar/g } $file ;
}
read_dir is also
On 10/02/2013 08:56 PM, Rob Dixon wrote:
On 03/10/2013 01:39, Uri Guttman wrote:
I do recommend you try to use File::Slurp to read in and write out your
files.
It would help a lot if you declared your interest in File::Slurp. It is
disingenuous to recommend your own modules.
i don't see
Peter Holsberg wrote:
sigh Let me start over.
The file I want to modify has a 6-digit filename and an extension htm.
For example, 131002.htm
I'm working in Windows, with Strawberry perl, with Randall L. Schwartz's
Randal L. Schwartz
John
--
Any intelligent fool can make things bigger and
Shawn H Corey wrote:
On Wed, 02 Oct 2013 13:57:36 -0400
Peter Holsbergpjh42atpobox@gmail.com wrote:
blushing I was so upset that I deleted it all! It seems to me that
it should be fairly straightforward, but at 79, the old synapses
aren't firing quite as well as they used to.
Can you
28 matches
Mail list logo