Hi John,
On Monday 07 Feb 2011 16:18:32 John Delacour wrote:
> At 14:22 +0200 07/02/2011, Shlomi Fish wrote:
> >Hi John,
> >
> >a few comments on your code.
> >
> >
> >Actually, see perldoc perlrun - http://perldoc.perl.org/perlrun.html - by
> >giving -p and -i (untested) you can replace the conte
At 14:22 +0200 07/02/2011, Shlomi Fish wrote:
Hi John,
a few comments on your code.
Actually, see perldoc perlrun - http://perldoc.perl.org/perlrun.html - by
giving -p and -i (untested) you can replace the contents of a file "in-place".
untested?! Why don't you test it before recommending
Hi John,
a few comments on your code.
On Monday 07 Feb 2011 13:50:57 John Delacour wrote:
> At 07:11 -0800 05/02/2011, zavierz wrote:
> >Here's code which was suggested to me, but when I execute it I'm
> >returned to the command line and nothing happens:
> >
> >#!/usr/bin/perl
> >s/^(Article\s+[0
At 07:11 -0800 05/02/2011, zavierz wrote:
Here's code which was suggested to me, but when I execute it I'm
returned to the command line and nothing happens:
#!/usr/bin/perl
s/^(Article\s+[0-9]+\s+\N*\S)/\\subsection*{$1}/gm
I called this script "Article" and saved it as article.pl
The usa
On 05/02/2011 15:11, zavierz wrote:
Hi, I am trying to modify a LaTex file which is plain text.
The file contains lines similar to the following, but each line is
followed by text, so that:
Article 1 Cats
Article 2 Dogs
Article 3 Fish
Article 4 Ferrets
etc.
I would like to modify the file
On Feb 5, 7:11 am, zavi...@gmail.com (zavierz) wrote:
> Hi, I am trying to modify a LaTex file which is plain text.
> The file contains lines similar to the following, but each line is
> followed by text, so that:
>
> Article 1 Cats
> Article 2 Dogs
> Article 3 Fish
> Article 4 Ferrets
>
> etc.
On 2011-02-06 16:52, mani kandan wrote:
$I=~s/^(Article\s+[0-9]+\s+[\A-Z_a-z]+\S)/\\subsection*{$1}/g;
print "$I";
That is weird advice in many ways:
1. A variable $I, what is it? Why capital?
2. No spaces around '=~', why?
3. You took out the m-modifier, why? (now it will only match (and
On 2011-02-05 16:11, zavierz wrote:
s/^(Article\s+[0-9]+\s+\N*\S)/\\subsection*{$1}/gm
Simplified:
s/^( Article \s+ [0-9]+ .* \S )
/\\subsection*{$1}/gmx;
--
Ruud
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://l
Dear zavierz
probably you can try this
$I=~s/^(Article\s+[0-9]+\s+[\A-Z_a-z]+\S)/\\subsection*{$1}/g;
print "$I";
--- On Sat, 5/2/11, zavierz wrote:
From: zavierz
Subject: Text Manipulation
To: beginners@perl.org
Date: Saturday, 5 February, 2011, 8:41 PM
Hi, I am trying to modify a
Hi, I am trying to modify a LaTex file which is plain text.
The file contains lines similar to the following, but each line is
followed by text, so that:
Article 1 Cats
Article 2 Dogs
Article 3 Fish
Article 4 Ferrets
etc.
I would like to modify the file so that each referenced line is
change
Per Larsson am Dienstag, 9. Mai 2006 17.50:
> Thank you, that solved the problem, but only partly I'm afraid. Problem
> is that the lines need to be formatted in a certain way, so that one
> line looks exactly like this:
> ATOM 1 N ALA 1 41.744 64.901 30.842 1.00 47.38
> 2CDV 8
Thank you, that solved the problem, but only partly I'm afraid. Problem
is that the lines need to be formatted in a certain way, so that one
line looks exactly like this:
ATOM 1 N ALA 1 41.744 64.901 30.842 1.00 47.38
2CDV 83
Is there a way to combine the code below w
On 5/9/06, Per Larsson <[EMAIL PROTECTED]> wrote:
snip
ie. get everything that is sitting between two ATOM-identifiers to occur
on the same line. How can I achieve this?
As always, TMTOWTDI:
You can set the input record separator
use strict;
use warnings;
{
local $/ = 'ATOM\n';
<>; #throw awa
Hello,
I have a question about doing the following in perl:
I have a file (a protein pdb file) thatt, for various (and unchangeable)
reasons look like this:
ATOM
1
N
ALA
1
41.744
64.901
30.842
1.00
47.38
2CDV
83
ATOM
2
CA
ALA
1
41.676
63.465
31.165
1.00
47.22
2CDV
84
...and so on. What I woul
Anybody?
Rob
Chinku Simon wrote:
>
> > Mohit_jain01 wrote:
> > >
> > > > From: Rob Dixon
> > > >
> > > > Mohit_jain01 wrote:
> > > > >
> > > > > I am facing a problem with text file manipulation with Perl.
> > > > >
> > > > > I have a file with over 2 lac lines of data.
> > > > > I need to find
Hi,
I wud like some help in assembling the kit.
Thanks in Advance
--- Rob Dixon <[EMAIL PROTECTED]> wrote:
> Mohit_jain01 wrote:
> >
> > > From: Rob Dixon
> > >
> > > Mohit_jain01 wrote:
> > > >
> > > > I am facing a problem with text file manipulation with Perl.
> > > >
> > > > I have a file wi
Mohit_jain01 wrote:
>
> > From: Rob Dixon
> >
> > Mohit_jain01 wrote:
> > >
> > > I am facing a problem with text file manipulation with Perl.
> > >
> > > I have a file with over 2 lac lines of data.
> > > I need to find the duplicates(strings) in the file and copy those records into
> > > another
,
Mohit
-Original Message-
From: Rob Dixon [mailto:[EMAIL PROTECTED]
Sent: Sat 6/14/2003 3:39 AM
To: [EMAIL PROTECTED]
Cc:
Subject: Re: Help required.about string/text manipulation
Mohit_jain01 wrote
Mohit_jain01 wrote:
> Hi,
>
> I am facing a problem with text file manipulation with Perl.
>
> I have a file with over 2 lac lines of data.
> I need to find the duplicates(strings) in the file and copy those records into
> another file.
>
> Is there a function/module in Perl by which I can read t
Hi,
I am facing a problem with text file manipulation with Perl.
I have a file with over 2 lac lines of data.
I need to find the duplicates(strings) in the file and copy those records into another
file.
Is there a function/module in Perl by which I can read the duplicates in a file at
one
Patricia E Gorden-Ozgul wrote:
>
> I need to construct a working printf statement where each field in a given
> record would print at a specified position.
>
> Each record may or may not contain any particular field but will always
> begin with .VENDOR.LIBRARY. and end with .VENDOR.XINFO.END.
>
Patricia E Gorden-Ozgul wrote:
> I need to construct a working printf statement where each field in a
> given record would print at a specified position.
Hi Pat.
I've been amusing myself with your problem for an hour or so, and
although I don't in general approve of handing out ready-made
solutio
Gorden-Ozgul, Patricia E wrote:
> I need to construct a working printf statement where each field in a
> given record
> would print at a specified position.
>
> Each record may or may not contain any particular field but will
> always begin with .VENDOR.LIBRARY. and end with .VENDOR.XINFO.END.
>
I need to construct a working printf statement where each field in a given
record
would print at a specified position.
Each record may or may not contain any particular field but will always
begin with .VENDOR.LIBRARY. and end with .VENDOR.XINFO.END.
Hope springs eternal for this novice perl scri
On Thursday, May 30, 2002, at 01:13 , Jakob Kofoed wrote:
> format STDOUT =
> @>> @> @> @> @> @>>
> $$a,$b,$c,$d,$e,$f
well ok, so to cheat I had to do
perldoc -f write
perldoc -f format
since I have not done this in so long
Jakob Kofoed wrote at Thu, 30 May 2002 22:13:42 +0200:
Sorry, I don't know enough of the format command to help.
But that seems to be a little bit long.
> print "Enter Path DATA file .. \n";
> chop($file = );
>
> print " \n";
> print "Enter DATA1 ... ";
> chop($data1 = );
>
> p
Hi,
I have a problem using the "format STDOUT =" in a Perl script.
The script takes a six columns data file - puts header on top of the
data (with different input - variables defined manually).
The script write the input to the screen but not a file - I have tried
but can only get the data and
27 matches
Mail list logo