On 1/21/06, Bowen, Bruce <[EMAIL PROTECTED]> wrote:
> I know how to get rid of the carriage returns using s/\n//g, but
> haven't had any luck in finding the way to get rid of the line feeds
> following the |fs.
Have you tried using a substitution? A line feed is often the
character "\x0A", in cas
On 1/21/06, Bowen, Bruce <[EMAIL PROTECTED]> wrote:
> That did not work. I've looked into the file with a hex editor it
> that's telling me there's a
> hex 0D 0A 0D 0A after each |FS. I've tried all of the combinations
> I can think of, none of which had any effect. The process seems
> to work
On 1/21/06, Rick Triplett <[EMAIL PROTECTED]> wrote:
> I time stamp a lot of my file interactions with $stamp = time(), but
> about one out of a hundred or so stamps gives me the system epoch
> date instead of the true date.
If your time() function ever gives you the epoch (zero or undef),
that's
On Jan 21, 2006, at 21:43, Bowen, Bruce wrote:
> Perhaps that file has mixed newline conventions? Does
>
> $entire_file_content =~ tr/\015\012//d;
>
> do what you need?
>
> -- fxn
>
> That did not work. I've looked into the file with a hex editor it
> that's telling me there's a
> hex 0D
On Jan 21, 2006, at 21:43, Bowen, Bruce wrote:
Perhaps that file has mixed newline conventions? Does
$entire_file_content =~ tr/\015\012//d;
do what you need?
-- fxn
That did not work. I've looked into the file with a hex editor it
that's telling me there's a
hex 0D 0A 0D 0A after ea
On Jan 21, 2006, at 17:28, Bowen, Bruce wrote:
> I have files with this format
>
> text
> text
> |fs
>
> text
> text
> text
> |fs
>
> The goal here is to make this data into a flat file of continuous
> text (including the |fs).texttext|fstexttexttext|fs
>
> I know how to get rid of the carr
Hello,
We attempting to write a script that will read an RSS feed and write that feed,
item-by-item, into an HTML webpage.
The RSS feed that will serve as the source is at
http://earthquake.usgs.gov/recenteqsww/catalogs/eqs7day-M2.5.xml
The script will update a HTML template page when execute
I time stamp a lot of my file interactions with $stamp = time(), but
about one out of a hundred or so stamps gives me the system epoch
date instead of the true date. Correct me if I'm wrong, but I am
assuming that the time() function makes a system call, and that it
can be checked for failu
On Jan 21, 2006, at 17:28, Bowen, Bruce wrote:
I have files with this format
text
text
|fs
text
text
text
|fs
The goal here is to make this data into a flat file of continuous
text (including the |fs).texttext|fstexttexttext|fs
I know how to get rid of the carriage returns using s/\n/
Bowen, Bruce wrote:
I know how to get rid of the carriage returns using s/\n//g,
> but haven't had any luck in finding the way to get rid
> of the line feeds following the |fs.
Sorry, \n means a line feed. Try:
s/\n//g; # Remove line feeds
s/\r//g; # Remove carriage returns
See:
perldoc p
I have files with this format
text
text
|fs
text
text
text
|fs
The goal here is to make this data into a flat file of continuous text
(including the |fs).texttext|fstexttexttext|fs
I know how to get rid of the carriage returns using s/\n//g, but haven't had
any luck in finding the way to
chen li wrote:
#!/usr/bin/perl
use warnings;
use strict;
my $string="password=xyz verbose=9 score=0";
my @keys=();
my @values=();
while ($string=~/(\w+)=(\w+)/g){
@keys=push(@keys, $1);
push @keys, $1;
print $1, "\n";
@values=push(@values,$2);
push @values, $2;
print $2,
Ron McKeever wrote:
> I wanted to print if it matches my range of IP's. I thought I could use the
> (#..#) and it would work, but it didn't:
>
> #!/usr/bin/perl -nlw
>
> # Print if Ip's are in
> # 111.9.1-18.### or
> # 111.9.20-100.###
> # range
> #
> my $a="1-18";
> my $b="20-100";
>
> wh
Vincent Li wrote:
> Hi List:
Hello,
> I have two files like this:
>
> file1:
> score CN_SUBJ_PROMOTE3.100 # [0.000..3.100]
> score CN_SUBJ_PROMOTION 3.600 # [0.000..3.600]
> score CN_SUBJ_PROVIDE3.000 # [0.000..3.000]
>
> file2:
> CN_SUBJ_PROMOTE
> C
chen li [cl], on Friday, January 20, 2006 at 21:33 (-0800 (PST)) wrote
these comments:
cl> one array and xyz, 9 and 0 into another array. But I
cl> don't get what I expect. I just wonder what is wrong?
nothing is wrong, you wrote good script. But if you want print values,
use at beginning:
$|++;
15 matches
Mail list logo