Re: how to sort in perl where the key is the 2nd of 3 components of a string where a dash is the separator?

2010-07-22 Thread marcos rebelo
On Fri, Jul 23, 2010 at 7:21 AM, Uri Guttman wrote: >> "KW" == Kenneth Wolcott writes: > >  KW>   The current output is a set of zero or more space separated >  KW> strings where each substring is a string of of three >  KW> dash-separated substrings. > > you should always show sample input d

AW: Compare file/dir size

2010-07-22 Thread HACKER Nora
Hi Rob, > My solution to this would be to simply open the directory and read the > files then using the individual files (easy enough to filter on > extensions or what ever else you like) compare the file sizes. [...] > Do the same with the other directory and compare the results (I would > use

Re: how to sort in perl where the key is the 2nd of 3 components of a string where a dash is the separator?

2010-07-22 Thread Uri Guttman
> "KW" == Kenneth Wolcott writes: KW> The current output is a set of zero or more space separated KW> strings where each substring is a string of of three KW> dash-separated substrings. you should always show sample input data and expected output (sorted data). just describing it eve

how to sort in perl where the key is the 2nd of 3 components of a string where a dash is the separator?

2010-07-22 Thread Kenneth Wolcott
Hi; I have a legacy Perl script that I need to modify. The current output is a set of zero or more space separated strings where each substring is a string of of three dash-separated substrings. I want to sort these space separated strings based on the middle of the dash-separated substring.

Re: META - Bounces from the list

2010-07-22 Thread Dermot
n 22 July 2010 18:05, Brandon McCaig wrote: > On Wed, Jul 21, 2010 at 5:38 AM, Dermot wrote: >> I suspect this might be because I recently changed my email address >> domain from googlemail.com to gmail. I can't now un-subscribe because >> the mailer program will not recognise my new address if I

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: Word boundaries

2010-07-22 Thread Brandon McCaig
On Thu, Jul 22, 2010 at 12:57 AM, Chandan Kumar wrote: > ex: $_="#!chk/usr/bin/perl"; > > 1)The output for (\b\W\b) is \ There is no \ (back-slash) character in your string. :\ I assume then that you meant '/' (forward-slash)? > Iam looking for some character which is between a word charact

Re: META - Bounces from the list

2010-07-22 Thread Brandon McCaig
On Wed, Jul 21, 2010 at 5:38 AM, Dermot wrote: > I suspect this might be because I recently changed my email address > domain from googlemail.com to gmail. I can't now un-subscribe because > the mailer program will not recognise my new address if I send an > email to "beginners-unsubscr...@perl.or

Re: Some explanation please -- iterating thru command line arguments

2010-07-22 Thread Brandon McCaig
On Wed, Jul 21, 2010 at 1:17 PM, newbie01 perl wrote: > Does $_ contains the following values on each iteration? > > mail_smtp.pl > -r > ${MAILFROM} > -s > "$subject_line TEST EMAIL" > supportm...@test.com > < > /tmp/test_email.txt Just to clarify the end of the command line: mail_smtp.pl -r ${M

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: Example code for storing picture in MySQL DB

2010-07-22 Thread Mimi Cafe
Years back I read the pros and cons of storing pictures in a database (column type blob) against storing them on the file system, and I always thought storing pictures in the database blob is a better option. But I have never seen a clean example of how to programmatically insert the picture (binar

Re: invoking ftp object with ssh object....

2010-07-22 Thread Shlomi Fish
On Thursday 22 Jul 2010 13:44:46 Sooraj S wrote: > Hi, > > I am using Net::SSH::Perl, Net::FTP to loginto remote machines... > I want to 'scp' some files in my local system to the remote machine > remote_1. After that, from the remote_1 i want to upload those files > to an FTP server, remote_2. I

invoking ftp object with ssh object....

2010-07-22 Thread Sooraj S
Hi, I am using Net::SSH::Perl, Net::FTP to loginto remote machines... I want to 'scp' some files in my local system to the remote machine remote_1. After that, from the remote_1 i want to upload those files to an FTP server, remote_2. I can access remote_2 only through remote1. Please guide me on

Re: doubts in using net::telnet in perl

2010-07-22 Thread Chas. Owens
On Thu, Jul 22, 2010 at 03:38, Sooraj S wrote: > Thanks for your help...It worked...My shell script prints properly... > > At one stage it will prompt for user input > -- > Mountpoint : Xpr23filesystem > Kernel : verified > P2P : katren" > OK to go : [y/n] ?

Re: doubts in using net::telnet in perl

2010-07-22 Thread Sooraj S
Thanks for your help...It worked...My shell script prints properly... At one stage it will prompt for user input -- Mountpoint : Xpr23filesystem Kernel : verified P2P : katren" OK to go : [y/n] ? -- How to get the user in

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: Example code for storing picture in MySQL DB

2010-07-22 Thread Dr.Ruud
Mimi Cafe wrote: Anyone worked on a project where they have stored pictures in MySQL db from Perl program? I need to store pictures in MYSQL and my initial thought was a normal insert statement. Now I did a bit of search and people are making it completed out there. I have not tried it, but I w

Re: Perl 6 soon?

2010-07-22 Thread Dr.Ruud
Jeff Pang wrote: I saw the words from a people's blog: After only a short ten year wait, a Perl 6 implementation is scheduled for release this month. Rakudo * (aka Rakudo Star) will be inaugurated on July 29th, 2010. Does this mean Perl 6 will be first released soon? There have been Perl 6

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: Entering array output

2010-07-22 Thread perl_learner
Hi John, Thanks for your reply. On Jul 18, 6:48 pm, jwkr...@shaw.ca ("John W. Krahn") wrote: > perl_learner wrote: > > Hi, > > Hello, > > > > > > > #!/usr/bin/perl > > #!/usr/bin/perl -w > > > my @result=`find ../src -name '*Msgs.msg'`; > > #print "MSG direictories are: $result[0]"; > > > foreach

Re: Example code for storing picture in MySQL DB

2010-07-22 Thread Shlomi Fish
On Thursday 22 Jul 2010 06:48:08 Mimi Cafe wrote: > Anyone worked on a project where they have stored pictures in MySQL db from > Perl program? I need to store pictures in MYSQL and my initial thought was > a normal insert statement. Now I did a bit of search and people are making > it completed o