RE: Help connection to mysql database

2013-06-26 Thread Brian Raven
From: activeperl-boun...@listserv.activestate.com [mailto:activeperl-boun...@listserv.activestate.com] On Behalf Of zilore mumba Sent: 25 June 2013 23:04 To: activeperl@listserv.activestate.com Subject: Help connection to mysql database > Excuse my total ignorance on the above subject. I

RE: Help connection to mysql database

2013-06-26 Thread Henry Hartley
On: Tuesday, June 25, 2013 At: 6:04 PM, zilore mumba Wrote: >> $db ="IP address"; # should the IP address be here or I just >> put MySQL? This should be the actual name of the database. Naturally I don't know what your database is named, so I cannot tell you what it shou

Help connection to mysql database

2013-06-25 Thread zilore mumba
Excuse my total ignorance on the above subject. I am trying to access a mysql database via a perl script, and I came across the example below, but am not sure whether my are correctly filled (where marked below). I would appreciate assistance to clarify what should actua

Need help: package.xml not found: ActivePerl 5.14 (1402) on Windows 7 x64

2012-05-18 Thread Prahlad, Anand (GBS)
Hello, I hope someone can help me. I get a '404 not found' when PPM tries to access package.xml. I am running ActivePerl 5.14 (1402) on Windows 7 on x64 - the community edition. Below is the output I get from "ppm log". Can someone help? Is this to do with not having the

Re: help regex replacement

2012-05-02 Thread zilore mumba
Brian, Thank you very much. Your code is very concise and does exactly what I want. Regards Zilore From: Brian Raven To: "activeperl@listserv.ActiveState.com" Sent: Wednesday, May 2, 2012 11:39 AM Subject: RE: help regex replacement Sorry t

RE: help regex replacement

2012-05-02 Thread Brian Raven
00:00', '2012-05-01_00:00:00', Last line HTH -- Brian Raven From: activeperl-boun...@listserv.activestate.com [mailto:activeperl-boun...@listserv.activestate.com] On Behalf Of zilore mumba Sent: 01 May 2012 08:22 To: zilore mumba; $Bill Luebkert Cc: activeperl@listserv.ActiveSta

Re: help regex replacement

2012-05-01 Thread zilore mumba
onth}-${eday}_00:00:00',\n"; * print scalar(); * print scalar(); * print OUT scalar() for 6..37; *   close IN; *   close OUT; ** From: zilore mumba To: zilore mumba ; $Bill Luebkert Cc: "activeperl@listserv.

Re: help regex replacement

2012-04-30 Thread zilore mumba
0:00',$/ I hope this is possible. Zilore From: zilore mumba To: $Bill Luebkert Cc: "activeperl@listserv.ActiveState.com" Sent: Tuesday, May 1, 2012 5:31 AM Subject: Re: help regex replacement Thanks very much Bill, and also for the as

Re: help regex replacement

2012-04-30 Thread zilore mumba
e.com" Sent: Tuesday, May 1, 2012 12:02 AM Subject: Re: help regex replacement On 04/30/2012 14:28, zilore mumba wrote: > sample input > start_date = > '2012-04-29_00:00:00','2012-04-29_00:00:00','2012-04-29_00:00:00', > end_date = '2012-0

Re: help regex replacement

2012-04-30 Thread $Bill Luebkert
On 04/30/2012 14:28, zilore mumba wrote: > sample input > start_date = > '2012-04-29_00:00:00','2012-04-29_00:00:00','2012-04-29_00:00:00', > end_date = '2012-05-01_00:00:00','2012-05-01_00:00:00','2012-05-01_00:00:00', > > The model would have run on 29th May, to produce a 48hour forecast to 1sr

Re: help regex replacement

2012-04-30 Thread Michael Ludwig
zilore mumba schrieb am 30.04.2012 um 14:28 (-0700): > sample input > > start_date = > '2012-04-29_00:00:00','2012-04-29_00:00:00','2012-04-29_00:00:00', >  end_date   = > '2012-05-01_00:00:00','2012-05-01_00:00:00','2012-05-01_00:00:00', > > The model would have run on 29th May,  to produce a

Re: help regex replacement

2012-04-30 Thread zilore mumba
From: zilore mumba To: "Thurn, Martin (TASC)" Sent: Monday, April 30, 2012 10:29 PM Subject: Re: help regex replacement My mail should have readsample input start_date = '2012-04-29_00:00:00', '2012-04-29_00:00:00', '2012-04-29_00:00:00'

Re: help regex replacement

2012-04-30 Thread zilore mumba
0:00',  end_date   = '2012-05-02_00:00:00','2012-05-02_00:00:00','2012-05-02_00:00:00', ____ From: Michael Ludwig To: activeperl@listserv.ActiveState.com Sent: Monday, April 30, 2012 8:00 PM Subject: Re: help regex replacement zilore m

Re: help regex replacement

2012-04-30 Thread Michael Ludwig
zilore mumba schrieb am 30.04.2012 um 10:14 (-0700): > I have to automate a modle namelist by replacing the start and end > date of the model run as per lines below. Please provide two data items: * sample input * expected output Michael ___ ActivePerl

help regex replacement

2012-04-30 Thread zilore mumba
00',$/end_date = '${eyear}-${emonth}-${eday}_00:00:00','${eyear}-${emonth}-${eday}_00:00:00',      '${eyear}-${emonth}-${eday}_00:00:00',/g;     }   open (OUT, ">$out_fn") or die "open '$out_fn: failed $! ($^E)";    print OUT "@fie

Re: help formatting string

2012-02-10 Thread zilore mumba
Perl Mailing List' Sent: Friday, February 10, 2012 7:53 PM Subject: Re: help formatting string Hi Zilore, > From: zilore mumba > Sent: Friday, February 10, 2012 11:32 AM > To: 'Active State Perl Mailing List' > Subject: help formatting string > > Please help

Re: help formatting string

2012-02-10 Thread Francisco Zarabozo
Hi Zilore, > From: zilore mumba > Sent: Friday, February 10, 2012 11:32 AM > To: 'Active State Perl Mailing List' > Subject: help formatting string > > Please help with some very simple code below which somehow I a, not > getting right. > I have strings consis

RE: help formatting string

2012-02-10 Thread Brian Raven
From: activeperl-boun...@listserv.activestate.com [mailto:activeperl-boun...@listserv.activestate.com] On Behalf Of zilore mumba Sent: 10 February 2012 17:33 To: 'Active State Perl Mailing List' Subject: help formatting string > Please help with some very simple code below which som

Re: help formatting string

2012-02-10 Thread Ken Slater
On Fri, Feb 10, 2012 at 12:32 PM, zilore mumba wrote: > Please help with some very simple code below which somehow I a, not getting > right. > I have strings consisting of $day, $month, $year, $hour, $min, followed by > some float values which I call @rain, as in the attached fil

help formatting string

2012-02-10 Thread zilore mumba
Please help with some very simple code below which somehow I a, not getting right. I have strings consisting of $day, $month, $year, $hour, $min, followed by some float values which I call @rain, as in the attached file 'text1.txt'. I want rewrite this data as $year, $month, $day, $

Re: Please, I need help/suggestions/ideas with audio streaming for MIDI preview

2010-09-23 Thread Brett . Carroll
sible" - Italian Proverb "Francisco Zarabozo" Sent by: activeperl-boun...@listserv.activestate.com 09/22/2010 07:24 PM Please respond to Francisco Zarabozo To "Active State Perl Mailing List" cc Subject Please, I need help/suggestions/ideas with audio streaming for

Re: Please, I need help/suggestions/ideas with audio streaming forMIDI preview

2010-09-22 Thread Francisco Zarabozo
Thank you very much for your comments Michael. Francisco -- From: "Michael Ludwig" Sent: Thursday, September 23, 2010 1:08 AM To: Subject: Re: Please, I need help/suggestions/ideas with audio streaming forMIDI preview > Hi Franci

Re: Please, I need help/suggestions/ideas with audio streaming for MIDI preview

2010-09-22 Thread Michael Ludwig
Hi Francisco, this doesn't seem to have much (or anything) to do with Perl, but read my comments below. Francisco Zarabozo schrieb am 22.09.2010 um 18:24 (-0500): > So, I need to create a mp3 with the recorded midi file on it. Right > now, I'm using a command line utility that can convert midi f

Please, I need help/suggestions/ideas with audio streaming for MIDI preview

2010-09-22 Thread Francisco Zarabozo
Hello All, I will really appreciate any ideas or suggestions with this problem, if anyone can help, please help. :-) I'm working on a website (everything is working with mod_perl 2 and Perl 5.10 on Windows Server 2003 with Apache 2.2) that hosts thousands of midi files and I need to cre

Re: Help with sort

2010-04-01 Thread rex njoku
M, wrote: > >> >> >> -Original Message- >> From: Barry Brevik >> To: activeperl@listserv.ActiveState.com >> Sent: Wed, Mar 31, 2010 8:36 pm >> Subject: Help with sort >> >> > I'm having a problem sorting data items that are alph

Re: Help with sort

2010-04-01 Thread rex njoku
Apr 1, 2010 at 2:27 PM, wrote: > > > -Original Message- > From: Barry Brevik > To: activeperl@listserv.ActiveState.com > Sent: Wed, Mar 31, 2010 8:36 pm > Subject: Help with sort > > > I'm having a problem sorting data items that are alpha-numeric

Re: Help with sort

2010-04-01 Thread williamawalters
-Original Message- From: Barry Brevik <bbre...@stellarmicro.com> To: activeperl@listserv.ActiveState.com Sent: Wed, Mar 31, 2010 8:36 pm Subject: Help with sort > I'm having a problem sorting data items that are alpha-numeric strings. I know how to do it if the string is al

RE: Help with sort

2010-04-01 Thread BOURGNEUF Francois
CH-L4-RW125 Bour9 -Message d'origine- De : activeperl-boun...@listserv.activestate.com [mailto:activeperl-boun...@listserv.activestate.com] De la part de Francisco Zarabozo Envoyé : jeudi 1 avril 2010 06:00 À : Barry Brevik; activeperl@listserv.ActiveState.com Objet : Re: Help with sort Hi

RE: Help with sort

2010-04-01 Thread Brian Raven
Barry Brevik <> wrote: > I'm having a problem sorting data items that are alpha-numeric > strings. > I know how to do it if the string is all alpha or all numeric, but > the combo eludes me. > > Take as example the following code. It is my desire that the machine > names be processed in the orde

Re: Help with sort

2010-03-31 Thread Francisco Zarabozo
ancisco Zarabozo -- From: "Barry Brevik" Sent: Wednesday, March 31, 2010 6:36 PM To: Subject: Help with sort > I'm having a problem sorting data items that are alpha-numeric strings. > I know how to do it if the string is all alpha or a

Re: Help with sort

2010-03-31 Thread Bill Luebkert
Barry Brevik wrote: > I'm having a problem sorting data items that are alpha-numeric strings. > I know how to do it if the string is all alpha or all numeric, but the > combo eludes me. > > Take as example the following code. It is my desire that the machine > names be processed in the order that

Re: Help with sort

2010-03-31 Thread John W Kennedy
On Mar 31, 2010, at 8:36 PM, Barry Brevik wrote: > I'm having a problem sorting data items that are alpha-numeric strings. > I know how to do it if the string is all alpha or all numeric, but the > combo eludes me. > > Take as example the following code. It is my desire that the machine > names

Help with sort

2010-03-31 Thread Barry Brevik
I'm having a problem sorting data items that are alpha-numeric strings. I know how to do it if the string is all alpha or all numeric, but the combo eludes me. Take as example the following code. It is my desire that the machine names be processed in the order that they have been loaded into the

Re: help with ftp

2009-12-30 Thread zilore mumba
notes) and remove all my code after definition of the directories below? My appreciation for your time. Zilore --- On Wed, 12/30/09, Bill Luebkert wrote: From: Bill Luebkert Subject: Re: help with ftp To: "zilore mumba" Date: Wednesday, December 30, 2009, 2:09 AM     my

Re: help with ftp

2009-12-30 Thread zilore mumba
notes) and remove all my code after definition of the directories below? My appreciation for your time. Zilore --- On Wed, 12/30/09, Bill Luebkert wrote: From: Bill Luebkert Subject: Re: help with ftp To: "zilore mumba" Date: Wednesday, December 30, 2009, 2:09 AM     my

RE: help with ftp

2009-12-29 Thread Jeff Saxton
Recurse is probably a Boolean i.e. 0|1 Your put is failing because you're doing ftp->put not $ftp->put From: zilore mumba [mailto:zmu...@yahoo.com] Sent: Tuesday, December 29, 2009 9:15 AM To: activeperl@listserv.activestate.com; Jeff Saxton Subjec

RE: help with ftp

2009-12-29 Thread zilore mumba
time. Zilore --- On Tue, 12/29/09, Jeff Saxton wrote: From: Jeff Saxton Subject: RE: help with ftp To: "zilore mumba" , "activeperl@listserv.activestate.com" Date: Tuesday, December 29, 2009, 4:45 PM from the pod:   mkdir ( DIR [, RECURSE ]) Create a new directo

RE: help with ftp

2009-12-29 Thread Curtis Leach
orld of difference. From: activeperl-boun...@listserv.activestate.com [mailto:activeperl-boun...@listserv.activestate.com] On Behalf Of Jeff Saxton Sent: Tuesday, December 29, 2009 6:45 AM To: zilore mumba; activeperl@listserv.activestate.com Subject: RE: help with f

RE: help with ftp

2009-12-29 Thread Jeff Saxton
...@listserv.activestate.com] On Behalf Of zilore mumba [zmu...@yahoo.com] Sent: Tuesday, December 29, 2009 6:00 AM To: activeperl@listserv.activestate.com Subject: help with ftp Hello Perl Community. Thanks so much for all the help provided lduring the current year. Happy and prosperous New Year 2010 to all

help with ftp

2009-12-29 Thread zilore mumba
Hello Perl Community. Thanks so much for all the help provided lduring the current year. Happy and prosperous New Year 2010 to all. Below is my code where I have a problem with ftp. I am trying to transfer data from one PC to another. When I try to make a directory on the distant machine, I get

RE: Help with socket timeout

2009-12-10 Thread Jeff Saxton
Subject: Re: Help with socket timeout Jeff Saxton wrote: > Why not do it the simple way? > > use IO::Socket; > my $sock = IO::Socket::INET->new($somewhere); > $sock->timeout($n); Have you tried that on Windoze ? ___ ActivePerl ma

Re: Help with socket timeout

2009-12-10 Thread Bill Luebkert
Jeff Saxton wrote: > Why not do it the simple way? > > use IO::Socket; > my $sock = IO::Socket::INET->new($somewhere); > $sock->timeout($n); Have you tried that on Windoze ? ___ ActivePerl mailing list ActivePerl@listserv.ActiveState.com To unsubscribe:

RE: Help with socket timeout

2009-12-10 Thread Jeff Saxton
ursday, December 10, 2009 12:34 PM To: activeperl@listserv.ActiveState.com Subject: Re: Help with socket timeout Angelos Karageorgiou wrote: > > a better way to handle it would be via alarm(ed) timeouts like this > > eval { > local $SIG{ALRM} = sub { die "alarm\n" };

Re: Help with socket timeout

2009-12-10 Thread Bill Luebkert
Angelos Karageorgiou wrote: > > a better way to handle it would be via alarm(ed) timeouts like this > > eval { > local $SIG{ALRM} = sub { die "alarm\n" }; # NB \n required > alarm $timeout; > > A lot of socket work done here > > alarm 0; > }; > die if $@ && $@ ne "alarm\n

Re: Help with socket timeout

2009-12-10 Thread Angelos Karageorgiou
: Help with socket timeout I am using Active Perl 5.8.8 on Windows. I am writing an app that opens a TCP socket to a network printer, and then prints barcode labels on it. When the app starts up, it tries to determine if the specific printer is reachable or not. a better way to handle it

RE: Help with socket timeout

2009-12-09 Thread Ken Cornetet
Ping it first with Net::Ping -Original Message- From: activeperl-boun...@listserv.activestate.com [mailto:activeperl-boun...@listserv.activestate.com] On Behalf Of Barry Brevik Sent: Tuesday, December 08, 2009 7:44 PM To: activeperl@listserv.ActiveState.com Subject: Help with socket

Re: Help with socket timeout

2009-12-08 Thread Michael Ellery
Barry Brevik wrote: > I am using Active Perl 5.8.8 on Windows. > > I am writing an app that opens a TCP socket to a network printer, and > then prints barcode labels on it. When the app starts up, it tries to > determine if the specific printer is reachable or not. > > If the printer is on the

Help with socket timeout

2009-12-08 Thread Barry Brevik
I am using Active Perl 5.8.8 on Windows. I am writing an app that opens a TCP socket to a network printer, and then prints barcode labels on it. When the app starts up, it tries to determine if the specific printer is reachable or not. If the printer is on the network and online, then the test

Re: Help passing data to subroutine

2009-12-01 Thread Williamawalters
hi barry -- In a message dated 12/1/2009 5:34:34 PM Eastern Standard Time, bbre...@stellarmicro.com writes: > I have a situation where I specifically want to pass the name of an > array to a subroutine, and allow that subroutine to modify values in > the caller's copy of the array. this is c

Re: Help passing data to subroutine

2009-12-01 Thread Serguei Trouchelle
Barry Brevik wrote: > I have a situation where I specifically want to pass the name of an > array to a subroutine, and allow that subroutine to modify values in the > caller's copy of the array. my @arr = eval '@' . $name; Though PBP says it's bad, because it's compiling during eval so it takes

Re: Help passing data to subroutine

2009-12-01 Thread Michael Ellery
Barry Brevik wrote: > Using Active Perl 5.8.8. > > I have a situation where I specifically want to pass the name of an > array to a subroutine, and allow that subroutine to modify values in the > caller's copy of the array. > > I feel incredibly stupid, because I have a bunch of Perl books and

Help passing data to subroutine

2009-12-01 Thread Barry Brevik
Using Active Perl 5.8.8. I have a situation where I specifically want to pass the name of an array to a subroutine, and allow that subroutine to modify values in the caller's copy of the array. I feel incredibly stupid, because I have a bunch of Perl books and have worked on this a long time, a

RE: Help with PerlApp

2009-11-19 Thread sanket vaidya
ctiveperl-boun...@listserv.activestate.com [mailto:activeperl-boun...@listserv.activestate.com] On Behalf Of Barry Brevik Sent: Thursday, November 19, 2009 7:51 AM To: activeperl@listserv.ActiveState.com Subject: Help with PerlApp I have been using the Perl Dev Kit on Windows XP for a while now. A

Help with PerlApp

2009-11-18 Thread Barry Brevik
I have been using the Perl Dev Kit on Windows XP for a while now. All of a sudden, when I try to launch PerlApp, I get a dialog with the following message: pai.exe aborting X c:\program files\ActiveState Perl Dev Kit 7.0\bin\perlapp.exe is not recognized as a PDK tool. As far as I know

Re: Help with $_

2009-10-28 Thread Olivier Mengué
2009/10/28 Barry Brevik > So after all these years, I'm wondering, is there a PERLish way to add a > "\n" in the same line of code that prints the default $_ variable? > > >From perlvar: IO::Handle->output_record_separator EXPR $OUTPUT_RECORD_SEPARATOR $ORS $\ The output rec

Re: Help with $_

2009-10-28 Thread Gabor Szabo
On Wed, Oct 28, 2009 at 1:33 AM, Michael Ellery wrote: > I would recommend either (1) don't chomp in the first place or (2) just > do print "$_\n". > > -Mike > > Barry Brevik wrote: >> I am aware that there are a number of Perl "operations" that will use >> the system variable $_ as the default va

Re: Help with $_

2009-10-27 Thread Michael Ellery
I would recommend either (1) don't chomp in the first place or (2) just do print "$_\n". -Mike Barry Brevik wrote: > I am aware that there are a number of Perl "operations" that will use > the system variable $_ as the default variable if one is not supplied. > > Consider the following snippet (

Help with $_

2009-10-27 Thread Barry Brevik
I am aware that there are a number of Perl "operations" that will use the system variable $_ as the default variable if one is not supplied. Consider the following snippet (where XMLIN is a previously opened file handle): foreach () { chomp; # Do some stuff to the contents of the l

Re: Help with DBI to get HDD size of C drive of remote PC running MS-SQL Express 2005

2009-10-13 Thread Jenda Krynicky
From: "David Evans" > This is my Perl: > > *Begin Perl Code* > use DBIx::SQLEngine; > > $sqllist1 = "IF EXISTS (\nSELECT 1 FROM > INFORMATION_SCHEMA.ROUTINES\nWHERE ROUTINE_NAME = 'GetDriveSize'\nAND > ROUTINE_SCHEMA = 'dbo'\nAND ROUTINE_TYPE = 'FUNCTION'\n)\nBEGIN\nDROP > FUNC

Help with DBI to get HDD size of C drive of remote PC running MS-SQL Express 2005

2009-10-13 Thread David Evans
Hi Guys I hope someone can help me. I know the SQL works fine, but I can't work out how to get it to work with DBIx::SQLEngine. Cheers Dave This is the SQL I want to execute (and works from SQL Management Studio 2005): *Begin SQL Code* IF EXISTS ( SELECT 1

RE: Help with unpack

2009-10-12 Thread Brian Raven
Barry Brevik <> wrote: > I am writing an app which, at a certain point, needs to read a .PNG > graphics file. Your unpack question having been ably answered by others, I just thought to ask whether you had considered using any of the existing modules that understand png files, if it is image meta

Re: Help with unpack

2009-10-09 Thread John W Kennedy
On Oct 9, 2009, at 7:16 PM, Michael Ellery wrote: Have you tried reading it as BigEndian (using the N template)? It kinda > looks like BigEndian to me, but I get easily turned around by > endianness... That's the answer. 218103808 is decimal for hex 0x0d00, which is what you get when you l

Re: Help with unpack

2009-10-09 Thread Bill Luebkert
Michael Ellery wrote: > Have you tried reading it as BigEndian (using the N template)? It kinda > looks like BigEndian to me, but I get easily turned around by endianness... N is for Network byte order (big endian) and most PCs are little endian, so you probably have him on the right track. He ne

Re: Help with unpack

2009-10-09 Thread Michael Ellery
Have you tried reading it as BigEndian (using the N template)? It kinda looks like BigEndian to me, but I get easily turned around by endianness... -Mike Barry Brevik wrote: > I am writing an app which, at a certain point, needs to read a .PNG > graphics file. > > The .PNG file is always small,

Help with unpack

2009-10-09 Thread Barry Brevik
I am writing an app which, at a certain point, needs to read a .PNG graphics file. The .PNG file is always small, so I read the whole file (binmode) into a scalar, and this works well. if ($gfilesize = -s $gfilespec) { $GRAPHFILE = "<$gfilespec"; if (open GRAPHFILE) { binm

Help need on Net::SSH::Perl

2009-10-09 Thread VenkataRamaKrishna Boddu
Hi, This is my first mail to Active Perl community. My name is Venkata rama Krishna Boddu, working in Hyderabad, India I'm basically dealing with rebooting of a remote Windows Machine. Please see my sample code below. Looks like after rebooting the remote Windows Host, the SSH Connection Handl

Re: help rewrite files

2009-08-23 Thread Bill Luebkert
zilore mumba wrote: > Thanks all who assisted, especially Bill for the rewriting part and > others for the regex syntax. > The script rewrites the files but nothing is replaced. When I escape the > space as \s+ or \s it signals an error of unrecognized escape \s. > > Could it be the regex are

help rewrite files

2009-08-23 Thread zilore mumba
the required substitution? Help appreciated. Zilore use strict; use warnings; use POSIX; use File::Path; use File::Copy; my $debug=1; my $Grib_dir = 'grib_files'; opendir DIR, $Grib_dir or die "opendir failed on $Grib_dir: $! ($^E)"; while (my $file = readdir DIR) {

Re: help rewrite files

2009-08-21 Thread Bill Luebkert
John W Kennedy wrote: > > You /cannot/ do what you want to do. These are variable-length > records. You cannot rewrite them; you /must/ create a new file. Sure he can - if you noticed the code earlier, you would note that he read the file in, modified and pushed each line into an array and then

Re: help rewrite files

2009-08-21 Thread John W Kennedy
On Aug 21, 2009, at 3:21 PM, zilore mumba wrote: > Thanks very much Curtis. > I will try your suggestions. > Meanwhile, below is some of the text that appears in my files. The > text to be replaced is in blue. Somewhere in the file there is nxny > 1369 1380. 1369 is the correct one (37 x 37). >

RE: help rewrite files

2009-08-21 Thread zilore mumba
Thanks very much Curtis. I will try your suggestions. Meanwhile, below is some of the text that appears in my files. The text to be replaced is in blue. Somewhere in the file there is nxny 1369 1380. 1369 is the correct one (37 x 37). The people who are writing the files (these are forecast wind

RE: help rewrite files

2009-08-21 Thread Curtis Leach
_ From: activeperl-boun...@listserv.activestate.com [mailto:activeperl-boun...@listserv.activestate.com] On Behalf Of zilore mumba Sent: Friday, August 21, 2009 10:04 AM To: activeperl@listserv.activestate.com Subject: help rewrite files Further to my earlier mail, this is how I have construct

help rewrite files

2009-08-21 Thread zilore mumba
x 1)/(71 x 71)/g;    # (4 digits x 1)  in brackets replace by (71 x 71) I wonder if the search/replace syntax is correct Thanks for help Zilore ___ ActivePerl mailing list ActivePerl@listserv.ActiveState.com To unsubscribe:

Re: help rewrite files

2009-08-21 Thread zilore mumba
x 71 ny 71" and "(d2d2d2d2 x 1)" to be changed to "(71 x 71)" Thanks in advance for your time Zilore --- On Thu, 8/20/09, Bill Luebkert wrote: From: Bill Luebkert Subject: Re: help rewrite files To: "zilore mumba" Cc: activeperl@listserv.activestate.com

Re: help rewrite files

2009-08-20 Thread Bill Luebkert
below does not give any error but I end up with files of size 0 > and the same zero size files are copied to current directory where the > scrip is located. > Help will be appreciated. I don't follow your replacement rules, but I fixed the rest and attempted your rules literally. I

help rewrite files

2009-08-20 Thread zilore mumba
with files of size 0 and the same zero size files are copied to current directory where the scrip is located. Help will be appreciated. Zilore #!/usr/bin/perl -- use strict; use warnings; use POSIX; use File::Path; use File::Copy; # Variable declaration my $debug = 1; my $Grib_dir = "grib_

Re: need help from a new hand for perl

2009-08-18 Thread Bill Luebkert
John W Kennedy wrote: > > This is not a pure Perl program, but a mixed Perl-and-Unix program. I think what he means to say is that there are embedded shell commands intended for a UNIX platform (something that you would normally want to avoid when writing a script for portability). Check for 'sy

Re: need help from a new hand for perl

2009-08-18 Thread John W Kennedy
On Aug 18, 2009, at 5:30 PM, Fei Shi wrote: > Hi, Dear perl experts: > > I am a new hand of perl. I use perl because I am trying to > use a package called "miRDeep". I install the activeperl 5.10 for > windows. Then I used the MS DOS to try perl. > > But there is an error com

need help from a new hand for perl

2009-08-18 Thread Fei Shi
Hi, Dear perl experts: I am a new hand of perl. I use perl because I am trying to use a package called "miRDeep". I install the *activeperl 5.10 for windows*. Then

Help with automated script

2009-08-14 Thread Veeramani Selvakumar
Dear Perl experts, I have the following requirement which can be done in Perl/VB script whichever is smarted to do. I am new to perl and am sure i will learn a lot by your valuable hints . requirements are - the log file should be deleted if the files are older than 400 days - the log files from

Re: Help with regex

2009-08-13 Thread Bill Luebkert
deane.rothenma...@walgreens.com wrote: > > Cheap and dirty, cheezy, kindergarteny, but it does what you want: > > use strict; > use warnings; > > my $phnum = '847-VICTORY'; > > print "before: \"$phnum\"\n"; > > $phnum =~ s/[ABC]/2/ig; > $phnum =~ s/[DEF]/3/ig; > $phnum =~ s/[GHI]/4/ig; > $phnu

Re: Help with regex

2009-08-13 Thread Deane . Rothenmaier
Cheap and dirty, cheezy, kindergarteny, but it does what you want: use strict; use warnings; my $phnum = '847-VICTORY'; print "before: \"$phnum\"\n"; $phnum =~ s/[ABC]/2/ig; $phnum =~ s/[DEF]/3/ig; $phnum =~ s/[GHI]/4/ig; $phnum =~ s/[JKL]/5/ig; $phnum =~ s/[MNO]/6/ig; $phnum =~ s/[PQRS]/7/ig;

Re: Help with regex

2009-08-13 Thread anthony . okusanya
sanya From: "Stanislaw Romanski" To: "Barry Brevik" , Date: 08/13/2009 12:20 PM Subject: Re: Help with regex Sent by: activeperl-boun...@listserv.activestate.com Hello, Maybe you need something like $text =~ tr/ABCD/2223/; ? Stanislaw Romanski - Original Mess

Re: Help with regex

2009-08-13 Thread Stanislaw Romanski
Hello, Maybe you need something like $text =~ tr/ABCD/2223/; ? Stanislaw Romanski - Original Message - From: "Barry Brevik" To: Sent: Thursday, August 13, 2009 6:52 PM Subject: Help with regex >I am using Active Perl 5.8.8. and Perl Dev Kit 7.0. > > I&

Help with regex

2009-08-13 Thread Barry Brevik
I am using Active Perl 5.8.8. and Perl Dev Kit 7.0. I'm writing some code that standardizes the format of phone numbers in a database because users have entered them in every way imaginable. Anyway, some of the phone numbers look like this: 800-69-VORTEX ...where the user has entered alpha

Re: Help with file stuff

2009-07-27 Thread Basil A. Daoust
to location 128.\n"; > } > > close MAILSTATS; > } > > -Original Message- > From: activeperl-boun...@listserv.activestate.com > [mailto:activeperl-boun...@listserv.activestate.com] On Behalf Of Barry Brevik > Sent: Friday, July 17, 2009 3:02 PM > To:

RE: Help with file stuff

2009-07-17 Thread Ken Cornetet
location 128.\n"; } close MAILSTATS; } -Original Message- From: activeperl-boun...@listserv.activestate.com [mailto:activeperl-boun...@listserv.activestate.com] On Behalf Of Barry Brevik Sent: Friday, July 17, 2009 3:02 PM To: activeperl@listserv.ActiveState.com Subject: Help with

RE: Help with file stuff

2009-07-17 Thread Wayne Simmons
ginal Message- From: activeperl-boun...@listserv.activestate.com [mailto:activeperl-boun...@listserv.activestate.com] On Behalf Of Barry Brevik Sent: Friday, July 17, 2009 1:02 PM To: activeperl@listserv.ActiveState.com Subject: Help with file stuff I'm creating a file which is just an ASCII text file, but I&#

Help with file stuff

2009-07-17 Thread Barry Brevik
I'm creating a file which is just an ASCII text file, but I'm writing fixed length records into it. At any time, I need to reopen the file and write a record to a byte position calculated at run time. The write position will frequently be beyond the end of the current file length, so I need for the

Re: help with dispatch array

2009-06-09 Thread Williamawalters
hi barry and mike -- In a message dated 6/9/2009 6:44:02 PM Eastern Standard Time, mi...@s2technologies.com writes: > So, something like: > > my %functionTable = ( > 'string_1' => sub { >}, > 'string_2' => sub { >}, > ); > > invocation via: > > &$functionTable{'string_1'}(ARGLI

Re: help with dispatch array

2009-06-09 Thread Michael Ellery
So, something like: my %functionTable = ( 'string_1' => sub { }, 'string_2' => sub { }, ); invocation via: &$functionTable{'string_1'}(ARGLIST); ..is that what you had in mind? -Mike Barry Brevik wrote: > I am running Active Perl 5.8.8 on Windows. > > I'm coding an app right now w

help with dispatch array

2009-06-09 Thread Barry Brevik
I am running Active Perl 5.8.8 on Windows. I'm coding an app right now where it would be advantageous to be able to look up a text string in an array (or hash) and be able to branch to a subroutine that is somehow associated with that string. Am I dreaming, or is this possible? Barry Brevik

Need help for open source and diagramming research

2009-05-21 Thread chung
will be picked to receive a $30 Amazon gift certificate. Your participation is anonymous (unless you consent to have us contact you) Here is the survey address. https://secure.engr.oregonstate.edu/limesurvey/58564/lang-en We really appreciate your help

RE: Help with Regular Expression

2009-05-19 Thread Andy_Bach
Sorry, I really don't do the concept justice - a more comprehensive answer is to say - if you want help w/ REs, get "Mastering Regular Expressions" by J. Friedl http://oreilly.com/catalog/9780596528126/ It's it a great, great book, up there w/ the Camel and "Perl Be

RE: Help with Regular Expression

2009-05-19 Thread Andy_Bach
>> You're supposed to use the \1 format to match a current match, >> like a duplicated word >> $ echo "her here hear hear hop hip hip ho!" | perl \ -pe 's/(\w+)\s+\1\s+/double "${1}s" /g;' Barry B wrote: > I am confused about this. I thought that a back-reference looks like "$1", not "\1".

Re: Help with Regular Expression

2009-05-18 Thread Andy_Bach
$ cat test.txt |perl -pe 's/(\w+)([A-Z])/\1\. \2/g' made. Style facilitated. One Anti-magnetic. Quality RE pedanticism: \1 et alia are only supposed to be used on the LHS of the subst cmd. You'd want: cat test.txt |perl -pe 's/(\w+)([A-Z])/\1\. \2/g' or no need for cat (ye olde pipeline debate

Re: Help with Regular Expression

2009-05-16 Thread Williamawalters
hi curtis -- In a message dated 5/16/2009 7:56:26 AM Eastern Standard Time, cle...@harrahs.com writes: > 123FOO BAR > ... > -- > ... > 123. FOO BAR but i was thinking that 123FOO was *not* something that would need punctuation: it's probably not the end of one sentence and the be

RE: Help with Regular Expression

2009-05-16 Thread Curtis Leach
009 8:55 PM To: ari.constan...@gmail.com Cc: activeperl@listserv.activestate.com Subject: Re: Help with Regular Expression hi ari and barry -- In a message dated 5/15/2009 6:20:40 PM Eastern Standard Time, ari.constan...@gmail.com writes: > On Fri, May 15, 2009 at 11:18 PM, Barry Brevik wrote: > >

Re: Help with Regular Expression

2009-05-16 Thread Williamawalters
d upper-case character. > > > ... > > > Barry Brevik > > > > Hi Barry, > > > > Maybe something like this would help: > > > > $ cat test.txt > > madeStyle > > facilitatedOne > > Anti-magneticQuality > > >

Re: Help with Regular Expression

2009-05-15 Thread Williamawalters
words both preceding and > > following the "bad" words, so I have to be able to pick out the > > lower-case words that contain one embedded upper-case character. > > ... > > Barry Brevik > > Hi Barry, > > Maybe something like this would help: &

  1   2   3   4   5   6   7   >