Re: Real newbie question

2010-07-22 Thread Scott Hall
On Thu, Jul 22, 2010 at 2:34 AM, Dr.Ruud > wrote: > Jim Gibson wrote: > >> scribbled: >> > > I have a multi line text file laid out as below. >>> >>> 10.10.10.45 bobs >>> 10.10.10.34 jims >>> 10.10.10.27 jacks >>> >>> I would like to that the 10.10.10.??? and move it to the end of the same >>>

Re: Real newbie question

2010-07-22 Thread Uri Guttman
> "CD" == C DeRykus writes: CD> On Jul 21, 3:42 pm, u...@stemsystems.com ("Uri Guttman") wrote: >> >>         perl -pe 's/(\S+)\s+(\S+)/$2 $1/' file >> CD> Since the weather's good for golf... i was vaguely hinting at golf but i wanted a fairly normal looking solution as well!

Re: Real newbie question

2010-07-22 Thread C.DeRykus
On Jul 21, 3:42 pm, u...@stemsystems.com ("Uri Guttman") wrote: > > "JG" == Jim Gibson writes: > >   JG> On 7/21/10 Wed  Jul 21, 2010  11:51 AM, "Vaughan Williams" >   JG> scribbled: > >   >> Hi all, >   >> >   >> I'm hope you all could help me with a very simple question. >   >> >   >> I hav

Re: Real newbie question

2010-07-22 Thread Dr.Ruud
Jim Gibson wrote: scribbled: I have a multi line text file laid out as below. 10.10.10.45 bobs 10.10.10.34 jims 10.10.10.27 jacks I would like to that the 10.10.10.??? and move it to the end of the same line so the output will look like. bobs 10.10.10.45 jims 10.10.10.34 jacks 10.10.10.27

Re: Real newbie question

2010-07-22 Thread C.DeRykus
On Jul 21, 12:05 pm, jimsgib...@gmail.com (Jim Gibson) wrote: > On 7/21/10 Wed  Jul 21, 2010  11:51 AM, "Vaughan Williams" > scribbled: > >> ... > > > bobs 10.10.10.45 > > jims 10.10.10.34 > > jacks 10.10.10.27 > > . > > . > > perl -ane 'print join(" ",reverse(@F)),"\n"' file A variant us

Re: Real newbie question

2010-07-21 Thread Uri Guttman
> "JG" == Jim Gibson writes: JG> On 7/21/10 Wed Jul 21, 2010 11:51 AM, "Vaughan Williams" JG> scribbled: >> Hi all, >> >> I'm hope you all could help me with a very simple question. >> >> I have a multi line text file laid out as below. >> >> 10.10.10.45 bobs >> 10.

Re: Real newbie question

2010-07-21 Thread Uri Guttman
> "M" == Matt writes: M> Perl 1: Introduction to Perl M> http://www.oreillyschool.com/courses/perl1/ M> Online Course, Pricy but very good. i will second that as i know the author very well. level 2 will be out pretty soon. there will be 4 levels at least. these are not kiddie tutoria

Re: Real newbie question

2010-07-21 Thread Shlomi Fish
On Wednesday 21 Jul 2010 22:16:38 Vaughan Williams wrote: > Hi Uri, Jim, > > Thanks for the help, it is a very small file some 8kB in size. > > Jim's supplied command worked perfectly, although I really do not > understand it being a 1 day old perl "want-a-be" LOL > > I guess have allot of learn

Re: Real newbie question

2010-07-21 Thread Matt
> I guess have allot of learning to do, can anyone suggest a good starting > point books or online courses for true newbies. Learning Perl, Fifth Edition http://oreilly.com/catalog/9780596520113/ Best beginning Perl book. Perl Cookbook is great for examples as well. Perl 1: Introduction to Perl

Re: Real newbie question

2010-07-21 Thread Vaughan Williams
Hi Uri, Jim, Thanks for the help, it is a very small file some 8kB in size. Jim's supplied command worked perfectly, although I really do not understand it being a 1 day old perl "want-a-be" LOL I guess have allot of learning to do, can anyone suggest a good starting point books or online course

Re: Real newbie question

2010-07-21 Thread Uri Guttman
> "VW" == Vaughan Williams writes: VW> Hi all, VW> I'm hope you all could help me with a very simple question. VW> I have a multi line text file laid out as below. VW> 10.10.10.45 bobs VW> 10.10.10.34 jims VW> 10.10.10.27 jacks VW> . VW> . VW> I would like to that

Re: Real newbie question

2010-07-21 Thread Jim Gibson
On 7/21/10 Wed Jul 21, 2010 11:51 AM, "Vaughan Williams" scribbled: > Hi all, > > I'm hope you all could help me with a very simple question. > > I have a multi line text file laid out as below. > > 10.10.10.45 bobs > 10.10.10.34 jims > 10.10.10.27 jacks > . > . > > I would like to

Real newbie question

2010-07-21 Thread Vaughan Williams
Hi all, I'm hope you all could help me with a very simple question. I have a multi line text file laid out as below. 10.10.10.45 bobs 10.10.10.34 jims 10.10.10.27 jacks . . I would like to that the 10.10.10.??? and move it to the end of the same line so the output will look like. bobs

Re: a real newbie question!

2003-08-23 Thread Janek Schleicher
Robert Mark White wrote at Fri, 22 Aug 2003 23:37:48 -0600: > I see the "#!/usr/bin/perl -w" at the top of all programs. > I have read it tells perl where to run the program. No, it usually tells the (*nix) shell what program has to start - in this case /usr/bin/perl - and with what kind of argum

a real newbie question!

2003-08-23 Thread Robert Mark White
OK, now don't laugh so hard you fall off your chairs! I see the "#!/usr/bin/perl -w" at the top of all programs. I have read it tells perl where to run the program. This information I assume refers to a *nix box directory structure. I am using windows and using activeperl I think that it may mean