Hi,
On Thu, 24 May 2018 20:27:23 +0530
SATYABRATA KARAN wrote:
> Hello,
> Does anyone guide me how to handle a huge file (>50GB) in perl?
>
> I tried open method this way, but it's hanging the terminal. I think that
> is out of memory error internally.
>
> open my $FILE, "<", "Log_file.txt";
>
On Thu, 24 May 2018 20:27:23 +0530
SATYABRATA KARAN wrote:
> Hello,
> Does anyone guide me how to handle a huge file (>50GB) in perl?
Your code should be looping line by line, and shouldn't use much
memory, depending of course on how long the lines are, and what you're
doing with them.
It will
A lot depends on the contents of "some task;". If the task does not leave
stuff in memory for each iteration, then it is just taking a long time. If
it does leave stuff in memory, then you could easily run out of memory.
Also, a lot depends on the OS. For instance, the defaults for filesystems
Hello,
Does anyone guide me how to handle a huge file (>50GB) in perl?
I tried open method this way, but it's hanging the terminal. I think that
is out of memory error internally.
open my $FILE, "<", "Log_file.txt";
while (<$FILE>) {
chomp;
some task;
...
}
close $FILE;
Thanks,
Satya
See below the quoted text
On 02/03/2014 08:12 PM, SSC_perl wrote:
I'm having a problem with the script below. I want to alter just the first line
of a CSV file, removing the prefix "tag_" from each value in that line.
However, because the new line is shorter than the original, the sc
Thanks everyone. Both Tie::File and File::Slurp work nicely for this
purpose. Now comes the hard part - picking which one I want to use. ;)
Frank
http://www.surfshopcart.com/
Setting up shop has never been easier!
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additio
On Tue, 04 Feb 2014 11:59:30 +
Rob Dixon wrote:
> If it is satisfactory to leave the original file with trailing spaces
> at the end of the first line, then you can do so like this
>
> use strict;
> use warnings;
>
> my $filename = 'products.csv';
> open (my $fh, '+<', $filename) || die "ca
On 04/02/2014 01:12, SSC_perl wrote:
use strict;
use warnings;
my $filename = 'products.csv';
open (my $fh, '+<', $filename) || die "can't open $filename: $!";
my $line = <$fh>;
$line =~ s/tag_//gi;
seek $fh, 0, 0;
printf {$fh} $line;
close $fh;
If it is satisfactory to leave the original fil
On 02/03/2014 09:05 PM, Shawn H Corey wrote:
On Mon, 03 Feb 2014 20:50:17 -0500
Uri Guttman wrote:
Is there a way to replace the entire line with the new, shorter
one?
that is a unix problem and can't be done in any language.
It's not even a UNIX problem. Windows and BSD have it too. It is
On Mon, 03 Feb 2014 20:50:17 -0500
Uri Guttman wrote:
> > Is there a way to replace the entire line with the new, shorter
> > one?
>
> that is a unix problem and can't be done in any language.
It's not even a UNIX problem. Windows and BSD have it too. It is an
artifact of how files are create
On 02/03/2014 08:12 PM, SSC_perl wrote:
I'm having a problem with the script below. I want to alter just the
first line of a CSV file, removing the prefix "tag_" from each value in
that line. However, because the new line is shorter than the original,
the script is only over-writing part of the
I'm having a problem with the script below. I want to alter just the
first line of a CSV file, removing the prefix "tag_" from each value in that
line. However, because the new line is shorter than the original, the script
is only over-writing part of the original line (exactly the num
On Mon, Oct 1, 2012 at 3:34 AM, Irfan Sayed wrote:
> hi,
>
> i need to delete all blank lines from the text file
>
>
I usually just skip the blank lines when I read the data one line at a
time. Then you can print to a new file.
My example is below:
#!/usr/bin/perl
use 5.010;
thanks a lot !
will improve the coding standard.
regards,
irfan
From: Shlomi Fish
To: Irfan Sayed
Cc: Perl Beginners
Sent: Monday, October 1, 2012 4:08 PM
Subject: Re: delete blank lines from text file
Hi Irfan,
On Mon, 1 Oct 2012 01:34:51 -0700 (PDT
Hi Irfan,
On Mon, 1 Oct 2012 01:34:51 -0700 (PDT)
Irfan Sayed wrote:
> hi,
>
> i need to delete all blank lines from the text file
>
How do you define a blank line? Is it an empty line? Is it a line that contains
only
whitespace?
In any case, here are a few comments on your co
ed to delete all blank lines from the text file
>
>
> wrote following code. however, all the blank lines are not getting
> deleted. please suggest
>
>
> open FILE,"+<", 'C:\Users\bvcontrolbuild\Desktop\test.txt';
>
> while ()
>{
>
hi,
i need to delete all blank lines from the text file
wrote following code. however, all the blank lines are not getting deleted.
please suggest
open FILE,"+<", 'C:\Users\bvcontrolbuild\Desktop\test.txt';
while ()
{
chomp;
push (@lines, &q
On 06/08/2011 15:14, Emeka wrote:
John,
Thanks for making things pretty simple for mere mortals ..
Hi Emeka
chomp( my $raw_file = glob "@ARGV" );
I am of the view that glob sub is used for as tree (that is to get all the
files in a folder and all its sub-folders. From the above, it see
John,
Thanks for making things pretty simple for mere mortals ..
>>
> chomp( my $raw_file = glob "@ARGV" );
>
I am of the view that glob sub is used for as tree (that is to get all the
files in a folder and all its sub-folders. From the above, it seems like it
could be used for something else.
> "ta" == timothy adigun <2teezp...@gmail.com> writes:
ta> I believe you know that in Perl there are more than one way to do
ta> it! i.e solve a problem. And that one way is no better than the
ta> other, it only depend on what the programmer preferred to use, as
ta> long as the syntax
Hi John,
I believe you know that in Perl there are more than one way to do it! i.e
solve a problem. And that one way is no better than the other, it only
depend on what the programmer preferred to use, as long as the syntax are
correct.
Secondly, most of your why would have been answered, if only y
timothy adigun wrote:
Hi Ryan,
Try the the code below, it should help.
===
#!/usr/bin/perl -w
use strict;
my $ln="";
my ($yr,$cat,$win)=("","","");
my $filename="New_output.txt";
chomp(my $raw_file=<@ARGV>);
That is the same as saying:
chomp( my $raw_file = glob
Timothy,
That worked like a charm. Thank you so much for the help.
-Ryan
On Thu, Aug 4, 2011 at 4:41 AM, timothy adigun <2teezp...@gmail.com> wrote:
> Hi Ryan,
> Try the the code below, it should help.
>
> ===
>
> #!/usr/bin/perl -w
> use strict;
>
> my $ln="";
> my ($yr,
Hi Ryan,
Try the the code below, it should help.
===
#!/usr/bin/perl -w
use strict;
my $ln="";
my ($yr,$cat,$win)=("","","");
my $filename="New_output.txt";
chomp(my $raw_file=<@ARGV>);
open READFILE,"<","$raw_file" or die "can't open $!";
open OUTPUTFILE,">","$filenam
Hello,
I have been scratching my head on this problem and was wondering if someone
can help me out. Basically I need to take a raw list of data (a snippet of
it is below my email) and create another file with the information formatted
in the following format: "Date: Category: Winner." The example
On Wed, Nov 17, 2010 at 3:26 AM, Rob Dixon wrote:
> On 16/11/2010 17:01, Vincent Li wrote:
>>
>> Hi List,
>>
>> I have a text test.txt file looks like below:
>>
>> stp instance 0 {
>> interfaces 1.1 {
>> external path cost 2
>> internal path cost 2
>> }
>> vla
On Wed, Nov 17, 2010 at 3:26 AM, Rob Dixon wrote:
> On 16/11/2010 17:01, Vincent Li wrote:
>>
>> Hi List,
>>
>> I have a text test.txt file looks like below:
>>
>> stp instance 0 {
>> interfaces 1.1 {
>> external path cost 2
>> internal path cost 2
>> }
>> vla
On 16/11/2010 17:01, Vincent Li wrote:
Hi List,
I have a text test.txt file looks like below:
stp instance 0 {
interfaces 1.1 {
external path cost 2
internal path cost 2
}
vlans {
internal
vlan10
}
}
profile http http_global {
def
On Nov 16, 1:54 pm, vincent.mc...@gmail.com (Vincent Li) wrote:
> On Tue, Nov 16, 2010 at 1:11 PM, Shawn H Corey wrote:
>
> > On 10-11-16 04:07 PM, Vincent Li wrote:
>
> >> My aim is to remove specific profile.*{} block from that file
>
> > Yes, but if the {} blocks are nestable, then you can't do
Assuming your brackets are balanced, here's a drop-in regex for you:
/$profile .*?
( #Group 1
{
(?:
[^{}]+ | (?1) #If not brackets, eat up. Otherwise, recurse
on group 1.
)*?
}
)
/gx;
Minimally adapted from Anon.'s
On 11/16/10 Tue Nov 16, 2010 2:25 PM, "Vincent Li"
scribbled:
> On Tue, Nov 16, 2010 at 2:14 PM, Jim Gibson wrote:
>> On 11/16/10 Tue Nov 16, 2010 1:07 PM, "Vincent Li"
>> scribbled:
>>
>>> On Tue, Nov 16, 2010 at 9:38 AM, Jim Gibson wrote:
>>
You need a parser to do this righ
On Tue, Nov 16, 2010 at 2:14 PM, Jim Gibson wrote:
> On 11/16/10 Tue Nov 16, 2010 1:07 PM, "Vincent Li"
> scribbled:
>
>> On Tue, Nov 16, 2010 at 9:38 AM, Jim Gibson wrote:
>
>>>
>>> You need a parser to do this right. You might have some luck by reading the
>>> entire file into a scalar varia
On 11/16/10 Tue Nov 16, 2010 1:07 PM, "Vincent Li"
scribbled:
> On Tue, Nov 16, 2010 at 9:38 AM, Jim Gibson wrote:
>>
>> You need a parser to do this right. You might have some luck by reading the
>> entire file into a scalar variable and using the Text::Balanced module
>> together with some
On Tue, Nov 16, 2010 at 1:11 PM, Shawn H Corey wrote:
> On 10-11-16 04:07 PM, Vincent Li wrote:
>>
>> My aim is to remove specific profile.*{} block from that file
>
> Yes, but if the {} blocks are nestable, then you can't do it with regular
> expressions alone.
>
right, I only have one level nes
On 10-11-16 04:07 PM, Vincent Li wrote:
My aim is to remove specific profile.*{} block from that file
Yes, but if the {} blocks are nestable, then you can't do it with
regular expressions alone.
--
Just my 0.0002 million dollars worth,
Shawn
Programming is as much about organization
On Tue, Nov 16, 2010 at 9:38 AM, Jim Gibson wrote:
> On 11/16/10 Tue Nov 16, 2010 9:01 AM, "Vincent Li"
> scribbled:
>
>> Hi List,
>>
>> I have a text test.txt file looks like below:
>>
>> stp instance 0 {
>> interfaces 1.1 {
>> external path cost 2
>> internal path cos
On 11/16/10 Tue Nov 16, 2010 9:01 AM, "Vincent Li"
scribbled:
> Hi List,
>
> I have a text test.txt file looks like below:
>
> stp instance 0 {
>interfaces 1.1 {
> external path cost 2
> internal path cost 2
> }
>vlans {
> internal
> vlan10
On 10-11-16 12:01 PM, Vincent Li wrote:
how can I find a specific profile { } block and remove/replace that
part from the file
You will need a Finite-State Automation (FSA) with a push-down stack.
--
Just my 0.0002 million dollars worth,
Shawn
Programming is as much about organization
Hi List,
I have a text test.txt file looks like below:
stp instance 0 {
interfaces 1.1 {
external path cost 2
internal path cost 2
}
vlans {
internal
vlan10
}
}
profile http http_global {
defaults from http
max header size 38912
encryp
e:
>>
>> > I need some help with this problem.
>> > I've got a text file datafile with 1 line of data comprised of 30
>> > different numbers delimited with ~s.
>>
>> > I need to open this file, grab this line of data, split it into
>> > in
> "cc" == chaccou...@camcontacts com writes:
cc> Please unsubscribe from chaccou...@camcontacts.com and
h...@camcontacts.com
i don't manage this list. you can follow the directions for subscribing
which are in the headers of each email on the list.
uri
--
Uri Guttman -- u...@stem
> "F" == Frank writes:
F> #!/usr/bin/perl
F> open(DATA,"data.txt");
F> while() {
F> $number=$_;
F> # print $number;
F> while ($number =~ /([0-9]+)~s/g){
F> printf ("%d\n","$1");
F> }
F> }
F> close(DATA);
regardless of the poor code there and others have commen
Frank wrote:
On Feb 4, 4:35 pm, jwkr...@shaw.ca ("John W. Krahn") wrote:
Chris wrote:
I need some help with this problem.
I've got a text file datafile with 1 line of data comprised of 30
different numbers delimited with ~s.
I need to open this file, grab this line of data
On Feb 4, 4:35 pm, jwkr...@shaw.ca ("John W. Krahn") wrote:
> Chris wrote:
> > I need some help with this problem.
> > I've got a text file datafile with 1 line of data comprised of 30
> > different numbers delimited with ~s.
>
> > I need to open thi
On Feb 4, 2:27 am, cacogg...@gmail.com (Chris) wrote:
> I need some help with this problem.
> I've got a text file datafile with 1 line of data comprised of 30
> different numbers delimited with ~s.
>
> I need to open this file, grab this line of data, split it into
> indi
On Feb 4, 7:27 am, cacogg...@gmail.com (Chris) wrote:
> I need some help with this problem.
> I've got a text file datafile with 1 line of data comprised of 30
> different numbers delimited with ~s.
>
> I need to open this file, grab this line of data, split it into
> individual
Hi Frank!
On Thursday 04 Feb 2010 19:24:41 Frank wrote:
> For instance, the below is your data file --data.txt
> 12~s1~s314~s5677~s899~s0~s
> Here are the codes:
>
> #!/usr/bin/perl
> open(DATA,"data.txt");
> while() {
> $number=$_;
> # print $number;
> while ($number =~ /([0-9]+)~s/g){
>
);
On Feb 4, 7:27 am, cacogg...@gmail.com (Chris) wrote:
> I need some help with this problem.
> I've got a text file datafile with 1 line of data comprised of 30
> different numbers delimited with ~s.
>
> I need to open this file, grab this line of data, split it into
> individual
On Feb 4, 10:59 am, shlo...@iglu.org.il (Shlomi Fish) wrote:
> Hi Chris!
>
> Have you visitedhttp://perl-begin.org/yet and read a good introductory book
> or tutorial?
>
> On Thursday 04 Feb 2010 09:27:32 Chris wrote:
>
> > I need some help with this problem.
> > I
Chris wrote:
I need some help with this problem.
I've got a text file datafile with 1 line of data comprised of 30
different numbers delimited with ~s.
I need to open this file, grab this line of data, split it into
individual numbers, perform some simple math (addition) on each
number
Hi Chris!
Have you visited http://perl-begin.org/ yet and read a good introductory book
or tutorial?
On Thursday 04 Feb 2010 09:27:32 Chris wrote:
> I need some help with this problem.
> I've got a text file datafile with 1 line of data comprised of 30
> different numbers del
I need some help with this problem.
I've got a text file datafile with 1 line of data comprised of 30
different numbers delimited with ~s.
I need to open this file, grab this line of data, split it into
individual numbers, perform some simple math (addition) on each
number, and then put th
Alpesh Naik wrote:
> Hi Thomas,
> and thanks for the reply,
>
> Given below is my code,
>
> #!/usr/bin/perl
#!/usr/bin/perl -w
=> You should always enable warnings.
> use strict;
>
> print "Content-type:text/html\n\n";
> use CGI;
> my $query = new CGI;
=> If you're using CGI, then you should
Alpesh Naik asked:
> I am trying to edit the text file using perl script.
> i want to replace a particular text of file with new text.
>
> but the problem is that the new text appeared at end of file;
>
> How can i solve this problem,
> pls. help
We can help you
On Tue, Jul 7, 2009 at 02:25, Alpesh Naik wrote:
> Hi all,
>
> I am trying to edit the text file using perl script.
> i want to replace a particular text of file with new text.
>
> but the problem is that the new text appeared at end of file;
>
> How can i solve t
Hi all,
I am trying to edit the text file using perl script.
i want to replace a particular text of file with new text.
but the problem is that the new text appeared at end of file;
How can i solve this problem,
pls. help
Regards,
Alpesh.
e: copying a webpage and pasting to a text file
I seem to remember that Yahoo Finance has a Web-Services interface
that may alloy you to get financial data. The current figured are
lagged by about ten minutes or so. Take a look at the Yahoo Developer
Network (http://developer.yahoo.com/) for more
, Chas. Owens wrote:
> On Tue, Dec 23, 2008 at 11:30, Collaborate wrote:
>> I am wondering if there is a way to copy a webpage to a text file
>> using Perl. All I need is to copy as unformatted text.
>>
>> I would like to match certain strings on pages written
Collaborate wrote:
On Dec 23, 3:34 pm, nore...@gunnar.cc (Gunnar Hjalmarsson) wrote:
Collaborate wrote:
I am wondering if there is a way to copy a webpage to a text file
using Perl.
use LWP::Simple;
my $url = 'http://www.example.com/';
open my $fh, '>'
On Wed, Dec 24, 2008 at 22:09, Collaborate wrote:
> On Dec 23, 3:34 pm, nore...@gunnar.cc (Gunnar Hjalmarsson) wrote:
>> Collaborate wrote:
>> > I am wondering if there is a way to copy a webpage to a text file
>> > using Perl.
>>
>> use LWP::Simple;
&g
On Dec 23, 3:34 pm, nore...@gunnar.cc (Gunnar Hjalmarsson) wrote:
> Collaborate wrote:
> > I am wondering if there is a way to copy a webpage to a text file
> > using Perl.
>
> use LWP::Simple;
> my $url = 'http://www.example.com/';
> o
From: "Chas. Owens"
> On Tue, Dec 23, 2008 at 11:30, Collaborate wrote:
> > I am wondering if there is a way to copy a webpage to a text file
> > using Perl. All I need is to copy as unformatted text.
> >
> > I would like to match certain strings on page
On Tue, Dec 23, 2008 at 11:30, Collaborate wrote:
> I am wondering if there is a way to copy a webpage to a text file
> using Perl. All I need is to copy as unformatted text.
>
> I would like to match certain strings on pages written in javascript
> and to my understanding, www::me
Collaborate wrote:
I am wondering if there is a way to copy a webpage to a text file
using Perl.
use LWP::Simple;
my $url = 'http://www.example.com/';
open my $fh, '>', 'webpage.txt' or die $!;
print $fh get $url;
--
Gunnar Hjalmarsson
Em
On Tue, 2008-12-23 at 08:30 -0800, Collaborate wrote:
> I am wondering if there is a way to copy a webpage to a text file
> using Perl. All I need is to copy as unformatted text.
>
> I would like to match certain strings on pages written in javascript
> and to my understanding, www
I am wondering if there is a way to copy a webpage to a text file
using Perl. All I need is to copy as unformatted text.
I would like to match certain strings on pages written in javascript
and to my understanding, www::mechnize does not work for this
application.
--
To unsubscribe, e-mail
NewbeeUnix wrote:
On Sep 18, 11:49 am, [EMAIL PROTECTED] (Back9) wrote:
Is there a way to append a text file to an existing text file.
For example,
File A:
Jan Feb Mar April ...
File B:
10 30 40 20 ...
After appending job, the File A would be like below.
Jan Feb Mar April ...
10 30 40 20
On Sep 19, 11:31 am, [EMAIL PROTECTED] (John W. Krahn) wrote:
> Back9 wrote:
> > Hello,
>
> Hello,
>
> > Is there a way to append a text file to an existing text file.
> > For example,
> > File A:
> > Jan Feb Mar April ...
>
> > File B:
> &
On Sep 18, 11:49 am, [EMAIL PROTECTED] (Back9) wrote:
> Hello,
>
> Is there a way to append a text file to an existing text file.
> For example,
> File A:
> Jan Feb Mar April ...
>
> File B:
> 10 30 40 20 ...
>
> After appending job, the File A would be like below
Back9 schreef:
> Is there a way to append a text file to an existing text file.
Yes.
--
Affijn, Ruud
"Gewoon is een tijger."
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/
Back9 wrote:
Hello,
Hello,
Is there a way to append a text file to an existing text file.
For example,
File A:
Jan Feb Mar April ...
File B:
10 30 40 20 ...
After appending job, the File A would be like below.
Jan Feb Mar April ...
10 30 40 20 ...
open A, '>>', 'F
On Thu, 2008-09-18 at 10:16 -0700, Back9 wrote:
> Hello,
>
> Is there a way to append a text file to an existing text file.
> For example,
> File A:
> Jan Feb Mar April ...
>
> File B:
> 10 30 40 20 ...
>
> After appending job, the File A would be like below.
&
re a way to append a text file to an existing text file.
> For example,
> File A:
> Jan Feb Mar April ...
>
> File B:
> 10 30 40 20 ...
>
> After appending job, the File A would be like below.
> Jan Feb Mar April ...
> 10 30 40 20 ...
>
> TIA
>
>
> --
&g
Hello,
Is there a way to append a text file to an existing text file.
For example,
File A:
Jan Feb Mar April ...
File B:
10 30 40 20 ...
After appending job, the File A would be like below.
Jan Feb Mar April ...
10 30 40 20 ...
TIA
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional
Hello,
Is there a way to append a text file to an existing text file.
For example,
File A:
Jan Feb Mar April ...
File B:
10 30 40 20 ...
After appending job, the File A would be like below.
Jan Feb Mar April ...
10 30 40 20 ...
TIA
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional
> Message du 27/08/08 16:40
> De : "Bryan R Harris"
> A : "Beginners Perl"
> Copie à :
> Objet : Re: encrypt a text file
>
>
>
>
> > hello,
> >
> > how to encrypt a text file and decrypt it with perl?
> >
> > for ex
> hello,
>
> how to encrypt a text file and decrypt it with perl?
>
> for example, I have a config file,
>
> svr.conf
>
> I want to encrypt it to svr.conf.encrypt.
>
> But I should also have the ability to decrypt the encryped one to the
> original
[EMAIL PROTECTED] wrote:
how to encrypt a text file and decrypt it with perl?
for example, I have a config file,
svr.conf
I want to encrypt it to svr.conf.encrypt.
But I should also have the ability to decrypt the encryped one to the
original text.
when using
El Wednesday 27 August 2008 08:28:40 [EMAIL PROTECTED] va escriure:
> hello,
>
> how to encrypt a text file and decrypt it with perl?
>
> for example, I have a config file,
>
> svr.conf
>
> I want to encrypt it to svr.conf.encrypt.
>
> But I should also have the
hello,
how to encrypt a text file and decrypt it with perl?
for example, I have a config file,
svr.conf
I want to encrypt it to svr.conf.encrypt.
But I should also have the ability to decrypt the encryped one to the
original text.
Any suggestion is welcome. thanks.
--
To unsubscribe, e
[ Please do not top-post your replies. TIA ]
sanket vaidya wrote:
Here is the entire code to accomplish your task. It will delete 1st & 3rd
lines.
use warnings;
use strict;
my @array;
open FH,"data.txt";
You should *always* verify that the file opened correctly:
open FH, '<', 'data.txt' o
:21 PM
To: beginners@perl.org
Subject: How to replace one line in a text file with Perl?
Hi all,
I have a file that looks like:
*/tmp/dst/file1*234*RW*6790
*/tmp/dst/file2*568*RW*908
*/tmp/dst/file3*345*RW*746
*/test/flm/file4*354*RW*987
*/test/flm/file5*643*RW*645
I need to keep all of the lin
o: beginners@perl.org
Subject: How to replace one line in a text file with Perl?
Hi all,
I have a file that looks like:
*/tmp/dst/file1*234*RW*6790
*/tmp/dst/file2*568*RW*908
*/tmp/dst/file3*345*RW*746
*/test/flm/file4*354*RW*987
*/test/flm/file5*643*RW*645
I need to keep all of the lines with th
btna wrote:
I have a file that looks like:
*/tmp/dst/file1*234*RW*6790
*/tmp/dst/file2*568*RW*908
*/tmp/dst/file3*345*RW*746
*/test/flm/file4*354*RW*987
*/test/flm/file5*643*RW*645
I need to keep all of the lines with the exception of the one with
file1 and file3 which have in common "/tmp/dst"
Hi all,
I have a file that looks like:
*/tmp/dst/file1*234*RW*6790
*/tmp/dst/file2*568*RW*908
*/tmp/dst/file3*345*RW*746
*/test/flm/file4*354*RW*987
*/test/flm/file5*643*RW*645
I need to keep all of the lines with the exception of the one with
file1 and file3 which have in common "/tmp/dst". I
<$IN> ) {
print $OUT scalar <$IN> if /^findable/;
}
OK here's what I've got:
This (obviously) copies the whole text file. How can I select only
certain lines to copy based on either the line above or below it?
I suggested a solution. Why do you ignore my sug
On Jan 18, 10:27 am, [EMAIL PROTECTED] (Rob Dixon) wrote:
> Gunnar Hjalmarsson wrote:
> > [EMAIL PROTECTED] wrote:
> >> On Jan 14, 5:08 pm, [EMAIL PROTECTED] (Gunnar Hjalmarsson) wrote:
> >>> [EMAIL PROTECTED] wrote:
> >>>> I have a large text file wi
Gunnar Hjalmarsson wrote:
[EMAIL PROTECTED] wrote:
On Jan 14, 5:08 pm, [EMAIL PROTECTED] (Gunnar Hjalmarsson) wrote:
[EMAIL PROTECTED] wrote:
I have a large text file with
information essentially broken into lines like this:
findable text with a regexp
information I care about
more findable
[EMAIL PROTECTED] wrote:
On Jan 14, 5:08 pm, [EMAIL PROTECTED] (Gunnar Hjalmarsson) wrote:
[EMAIL PROTECTED] wrote:
I have a large text file with
information essentially broken into lines like this:
findable text with a regexp
information I care about
more findable text
There are plenty of
; Really? Which things specifically, and in what way?
>
> > I have a large text file with
> > information essentially broken into lines like this:
>
> > findable text with a regexp
> > information I care about
> > more findable text
>
> > There are plenty
[EMAIL PROTECTED] wrote:
I'm a nearly absolute beginner to Perl,
Then this site ought to be useful: http://learn.perl.org/
and a lot of the text manipulation things confuse me.
Really? Which things specifically, and in what way?
I have a large text file with
information essent
I'm a nearly absolute beginner to Perl, and a lot of the text
manipulation things confuse me. I have a large text file with
information essentially broken into lines like this:
findable text with a regexp
information I care about
more findable text
There are plenty of sections like this i
On Jan 2, 2008 6:21 AM, Siva Prasad <[EMAIL PROTECTED]> wrote:
> I have a problem printing values of DBI statement handle into a text file.
I have a problem reading your message, since it's all blue. Please,
don't do that.
> If I print the values in statement handle on t
Hi gurus,
I have a problem printing values of DBI statement handle into a text file.
The detail problem is as bellows:
I am sending a query to one of the subroutines of a package and getting
the statement handle with return statement
If I print the values in statement
John W . Krahn schreef:
> Dr.Ruud:
>> my $filename = "test.db";
>> open my $fd, "<", $filename
>> or die "'$filename': $!";
>>
>> (yes, I prefer Texan quotes nowadays :)
>
> Is that Dutch slang? I have never heard that expression before.
I paraphrased on a recent discussion in p6lang.
On Dec 12, 2007 8:46 AM, John W. Krahn <[EMAIL PROTECTED]> wrote:
> On Wednesday 12 December 2007 04:03, Dr.Ruud wrote:
snip
> > or die "'$filename': $!";
> >
> > (yes, I prefer Texan quotes nowadays :)
>
> Is that Dutch slang? I have never heard that expression before.
>
snip
Some people c
On Wednesday 12 December 2007 04:03, Dr.Ruud wrote:
> jeff pang schreef:
> > open FD,"test.db" or die $!;
>
> Jeff, could you please start using lexical filehandles, more
> whitespace, and 3-argument opens, when publishing example code on
> this list?
>
> my $filename = "test.db";
> open my $fd
On Dec 12, 2007 8:12 AM, jeff pang <[EMAIL PROTECTED]> wrote:
>
> --- "Chas. Owens" <[EMAIL PROTECTED]> wrote:
> > The only reason to use any version earlier than 5.6.3
> > is
> > that your sysadmins won't upgrade an ancient box (and even then it
> > is
> > time to quit that job because if they are
--- "Chas. Owens" <[EMAIL PROTECTED]> wrote:
> The only reason to use any version earlier than 5.6.3
> is
> that your sysadmins won't upgrade an ancient box (and even then it
> is
> time to quit that job because if they are that stupid then there
> are
> probably other issues as well).
>
mhh? if
On Dec 12, 2007 7:30 AM, jeff pang <[EMAIL PROTECTED]> wrote:
snip
> I'd like. But I learned perl from 2002 year, I even don't know what's
> perl 4.
snip
Some features you would have to stop using:
* lexical variables (i.e. my)
* multidimensional arrays and nested hashes
* real (vs symbolic) refer
1 - 100 of 608 matches
Mail list logo