Re: thanks for the info on removing control m's

2001-12-06 Thread Frank
3}/ or /\w{3}$/ -- Frank Booth - Consultant Parasol Solutions Limited. (www.parasolsolutions.com) -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Regex help

2001-12-07 Thread Frank
der of the line after the match. This has an overhead since using $&,$` or $' in one regex means they're populated on ALL subsequent regexes, also true of $1..$9 an alternative is to use negative lookbehinds or even just plain old: $line =~s/hardware ethernet //;$MAC_ADR=$line;

Re: System COmmand's in Perl

2001-12-07 Thread Frank
or this you can use the CPAN module File::Tail -- Frank Booth - Consultant Parasol Solutions Limited. (www.parasolsolutions.com) -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Finding 'probable' duplicate records

2001-12-07 Thread Frank
perhaps: use Digest::MD5 or check out the Guttman Rosler transform: http://raleigh.pm.org/sorting.html -- Frank Booth - Consultant Parasol Solutions Limited. (www.parasolsolutions.com) -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: renaming files - fatuous newbie query

2001-12-07 Thread Frank
tml and > nm*.gif. You want to change the names of gifs too? grep /nm.*\.(gif)|(html)/ for recursing dirs try Find::File > Stumped and need some advice please... > BTW: I get the list in digest format, so if you do reply please 'cc' me. Noted ;0) -- Frank Booth - Consultant

Re: help with reading a txt file

2001-12-10 Thread Frank
t; perl. ---end quoted text--- open I, 'somefile.txt' or die "Cannot open somefile $!\n"; @_=; # @_ now contains all the lines from somefile.txt # to change the record delimiter change $/ to the required value # the default is $/="\n"; -- Frank Booth - Consultant Parasol

Re: Shift and "=>"

2001-12-17 Thread Frank
better to establish your parameters before calling: # Set up defaults. my %params= ( -hostname=>'10.0.0.100', -community=>'public', -port=>'161'); # Based on params repopulate the hash. for (0..$#_){ # @_ is the array of passed params or @ARGV for commandlines

Re: ARGV

2001-12-18 Thread Frank
to save time and reinventing the wheel. -- Frank Booth - Consultant Parasol Solutions Limited. (www.parasolsolutions.com) -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: STDIN Formating

2002-01-03 Thread Frank
he reason I ask is Perl covers a lot of things, and better understanding of the context of your question will help us to answer it. hth. -- Frank Booth - Consultant Parasol Solutions Limited. (www.parasolsolutions.com) -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: split, ignoring spaces

2002-01-09 Thread Frank
uot;; @_=split; print Dumper \@_; it'll give you what I think you want: $VAR1 = [ 'mary', 'had', 'a', 'little', 'lamb' ]; -- Frank Booth - Consultant Parasol Solutions Limited. (www.parasol

Re: hiding file data

2002-01-09 Thread Frank
. For rolling your own cyphers to encrypt stuff, you'll need something like "Algolrithms in Perl" or to trust CPAN. All the best. -- Frank Booth - Consultant Parasol Solutions Limited. (www.parasolsolutions.com) -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: ^M's in file

2002-01-09 Thread Frank
cat file | perl -pe 's/\r//' > foo should work -- Frank Booth - Consultant Parasol Solutions Limited. (www.parasolsolutions.com) -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: foreach, while and flipping $_ !!!!!

2002-01-09 Thread Frank
le_contents =; # get all the file @wordcount = ($file_contents =~/^\b($word)\b/g); close (FILE); print"Word found $#wordfound times in file $_\n"; } -- Frank Booth - Consultant Parasol Solutions Limited. (www.parasolsolutions.com) -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: foreach, while and flipping $_ !!!!!

2002-01-09 Thread Frank
wordcount = 3 IIRC ) so that needs a check like defined $wordcount[0] to check that there is at least one match. It's just another way, it's not better for all instances. -- Frank Booth - Consultant Parasol Solutions Limited. (www.parasolsolutions.com) -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Regexp and lower case

2002-01-10 Thread Frank
cribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > ---end quoted text--- how about s/[^\d:A-Fa-f]//g ? or s/[^\d:a-f]//ig ? -- Frank Booth - Consultant Parasol Solutions Limited. (www.parasolsolutions.com) -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: excluding comments in a line

2002-01-14 Thread Frank
ent here ---end quoted text--- while(){ next if /^\s*(#.*)?$/; # Skip it if just comment or blank s/#.*$//; # remove comments ($key,$value)=split/\s+/,$_,2; # Get exactly two values out $config{$key}=$value; # Load into a hash for use. } -- Frank Booth -

Re: silly beginners problem :)

2002-01-15 Thread Frank
) { # this line is a title chomp; $TITLE=$_; $next_line_is_title=0; } /TITLE/ and $next_line is title; } HTH. -- Frank Booth - Consultant Parasol Solutions Limited. (www.parasolsolutions.com) -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: 2 simple questions - update:

2002-01-15 Thread Frank
On Mon, Jan 14, 2002 at 10:45:35PM -0600, Chris wrote: > On the path issue: > > What I need to do is to verify if a specific directory exists in the > current directory: > > if exists($PWD/ThisDir) then >print "WH00T" > End If ---end quoted text--- $_

Re: Maintaining a Cache of Hash References

2002-01-15 Thread Frank
return $results; } use Memoize; memoize('somefunc'); IIRC it then seemlessly caches in the background, for DB stuff also checkout the expiring caches, in case values change in the DB. Documentation here: http://theoryx5.uwinnipeg.ca/CPAN/data/perl/Memoize.html -- Frank B

Re: Random Access Numbers

2002-01-17 Thread Frank
Nothing that seems related to any of the other articles. Could you explain what you mean by Random Access Numbers and what you want them to do in your program? -- Frank Booth - Consultant Parasol Solutions Limited. (www.parasolsolutions.com) -- To unsubscribe, e-mail: [EMAIL PROTECTED] Fo

Re: Regex Assistance

2002-01-17 Thread Frank
me($num).$ext"); Is a bit more robust as it checks the directory and loops till it doesn't find a match for the file. IMO FWIW ;) -- Frank Booth - Consultant Parasol Solutions Limited. (www.parasolsolutions.com) -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Regex Assistance

2002-01-17 Thread Frank
On Thu, Jan 17, 2002 at 06:16:08PM +, Frank goofed: > my $num= ($name=~/\((\d+\)/)?$1:1; > $num++ while(-e "$name($num).$ext"); ---end quoted text--- Ah, forgot to paste the tested version back in my bad. #!/usr/bin/perl use strict; my($name,$ext)=('test',

Re: How to make it more perlish

2002-01-18 Thread Frank
my @PROG=( "c:\\OXE\\cygwin\\bootp\\linux\\$_Globals{LX_VERSION}", 'c:\\OXE\\cygwin\\bootp\\linux\\install', 'etc...'); my @LINK=qw(the same idea); for (0..$#PROG){ system ($LINK[$_]) unless -e $PROG[$_]

Re: $~ ?

2002-01-21 Thread Frank
s) it's more than likely to be someone refusing to declare a variable when there is one free to bend to their use. However that said, they might be using formats; look for lines like: 1) write . 2) format somename= I like formats, but I'm in a minority ;) -- Frank Boot

Re: object orientation :- please help

2002-01-21 Thread Frank
oc perlbot and for the hardcore: perldoc perltie An excellent book on the subject is "Object Oriented Perl" by Damien Conway. Without detracting from my fondness of Perl, it's not an OO language in as much that OO is immediately easy to do, and things like inheritance and polymorp

Re: Count Words

2002-01-22 Thread Frank
rate $1..$9 for all subsequent regexes, regardless of if they're needed. -- Frank Booth - Consultant Parasol Solutions Limited. (www.parasolsolutions.com) -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Count Words

2002-01-22 Thread Frank
; once, Perl will prepare it for every regex. $1 incurs the same > penalty, but only for the regex it is generated from. Cool, this I did not know. That's five things I've picked up from this list today (2 from this post) > I can give you a more thorough explanation of this (or pr

Re: Help with file

2002-01-24 Thread Frank
|| die "Error cannot close output file\n"; > > > > # output file must look like this > 30343647172834593220015.32M042001H > 30454345516485342450243.56M040532H > 30532325409275432930002.45M040332H > > ---end

Re: simple perl question

2002-01-25 Thread Frank
s will match the number of matches in the regular expression, not the values matched. Try: /a+([\d.]+)z and $total=$1; instead. however please note that this regex [\d.] will also match IP addresses since multiple '.' are allowed, it's probably not important in this instance. -- Frank Booth - Consultant Parasol Solutions Limited. (www.parasolsolutions.com) -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: CPAN locks up my hard drive.

2002-01-25 Thread Frank
perience of RedHat (5.2-7.2) I'd change to Debian... just kidding (well not really, but it's friday and too late in the week for an OS War ;)... I'd check on the bug list for RedHat if I were you. -- Frank Booth - Consultant Parasol Solutions Limited. (www.parasolsolutions.com) -- To u

Re: use strict

2002-02-05 Thread Frank
hey works. ---end quoted text--- use strict means that strict programming rules are applied to your code. One example is you need to declare variables using 'my' as in: my $a="value"; if you are using Unix, try this on the command-line, it should report a description of what s

Re: Return multiple arrays

2002-02-05 Thread Frank
#x27;foo', 'bar', 'baz' ], [ '1', '2', '3' ] ]; neat eh? -- Frank Booth - Consultant Parasol Solutions Limited. (www.parasolsolutions.com) -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: A more perlish way

2002-02-06 Thread Frank
"$program_path\\alize\\startup.txt.lnk"); > > foreach (@Symlink) > { > if (-e $_) > { > > system "rm $_"; > > } >} > > but it seems not to work?Why? I _th

Re: Inserting and array into an Oracle db

2002-02-07 Thread Frank
ate binding in Oracle it'll speed up the input of data since the SQL template is optimised and stored in a buffer, since Oracle has been informed that it is going to be reused many times. Of course it depends on the number of inserts as to whether it pays dividends. Personally I'd use

Re: Complete Beginner Looking for Advise!

2002-02-07 Thread Frank
int or character variables, unlike Java or C. This can make it somewhat confusing if you're used to languages like Java OR are learning the two simultaneously. All the best. -- Frank Booth - Consultant Parasol Solutions Limited. (www.parasolsolutions.com) -- To unsubscribe, e-mail

Re: reg exp question

2002-02-07 Thread Frank
; starts with a number in the range of 555000-555100 > > > /(^6565(\d{16})|^{555000-555100}(\d{16}))/ ---end quoted text--- /^(6565\d{12})|(555[10]00\d{10})/ Perhaps.. not tested mind. -- Frank Booth - Consultant Parasol Solutions Limited. (www.parasolsolutions.com) -- To uns

Re: reg exp question

2002-02-07 Thread Frank
{10})/ will manage the right range, I think. (6565\d{2}) will match 6 numbers as will (555 .. (0\d{2}) matches 000-099 (100) matches 100 ) \d{10} grab the remainder. -- Frank Booth - Consultant Parasol Solutions Limited. (www.parasolsolutions.com) -- To unsu

Re: simple question

2002-02-07 Thread Frank
nk if you used strict and -w you'd find it'd complain about not using uninitialised variables and may have flagged other points in the code. HTH -- Frank Booth - Consultant Parasol Solutions Limited. (www.parasolsolutions.com) -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Insert delimiter between number and alpha

2002-02-07 Thread Frank
On Thu, Feb 07, 2002 at 11:27:53AM -0600, Frank wrote: > All, > > My input looks like this > == > 5544#1341343BORIS > 6200#321BOWSER > 89232652#6213VERONICA > === > I want to put a delimiter (#) between the rightmost number and the left

Re: 1-line text file with numbers, need to add to them

2010-02-05 Thread Frank
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){ printf ("%d\n","$1"); } } close(DATA); On Feb 4, 7:27 am, cacogg...@gmail

Re: 1-line text file with numbers, need to add to them

2010-02-05 Thread Frank
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, split it into > >

a problem about GD

2005-05-09 Thread Frank
Sorry if my question is stupid or too simple. I have google the answer but got too much information I test my GD module to check whether it can be used since there are too many errors when install GD. the test program is copied from a website: ** #!/

Re: a problem about GD

2005-05-13 Thread Frank
Thanks, Zentara, The problem was fixed. zentara wrote: On Tue, 10 May 2005 12:31:34 +0800, [EMAIL PROTECTED] (Frank) wrote: Sorry if my question is stupid or too simple. I have google the answer but got too much information I test my GD module to check whether it can be used since there are

how to get data from an array

2005-05-15 Thread Frank
Hi, all, I am a newbie for perl. I am learning perl for my biological data analysis. Now, I have a data look like this: >I do not need-1 .(dots mean data here) . . >I do not need -2 .. . >What I

How to get the numeric index of a element in an array

2005-05-15 Thread Frank
Hi, all If i know the element of array, can I get the numeric index of this element? Thanks Frank -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>

Re: How to get the numeric index of a element in an array

2005-05-15 Thread Frank
Ing. Branislav Gerzo wrote: Frank [F], on Sunday, May 15, 2005 at 19:45 (+0800) typed: F> If i know the element of array, can I get the numeric index of this F> element? Exist a way, but it is better using hash. In arrays you have to iterate over every element. ~~~Pls tell me t

Re: How to get the numeric index of a element in an array

2005-05-15 Thread Frank
ndex+$n]"; $n +=1; }else { # if the element begins with ">", end the loop last; } } } But I do not how to get the numeric index of $elemnet.Or is there any other way to jump into next element? any suggestions are appreciated! Frank Octavian Rasnita wrote: Hi, Let's

Re: How to get the numeric index of a element in an array

2005-05-16 Thread Frank
at I want from such a cyclopaedia. Thanks Frank bright true wrote: hello , you can do something like the following my $counter = -1; foreach (@array){ $counter++; if($_ =~m/$word/){ print "Element ID is $counter";} } On 5/15/05, *Frank* <[EMAIL PROTECTED] <mailto:[EMAIL PR

Re: How to get the numeric index of a element in an array

2005-05-16 Thread Frank
Thanks! Mr. Clarkson's program really works. but because my array (data) is more complex. So I made an adjustment but it did not work very well. BTW: John W. Krahn suggested I can change Input Record Separator, it does work and help me to solve the problem! But I just wonder why the foll

a question about print in array

2005-05-24 Thread Frank
I met an interesting problem recently and am expecting your kind advice. my input file (for_test) is like as follows. I wish add a ">" to the first line (before the word blue) and remove ">" at the last line. # ---begining of the file, this line is not included in the file---# blue sky ski

Re: more reg exp

2002-02-11 Thread Frank
gt; I thought that perl would complete the inside brackets first > Then the s\.\\ would operate on the result. ---end quoted text--- howabout : /([0-9]*\.?[0-9]+)/ and printf("%09.2f",$1/); -- Frank Booth - Consultant Parasol Solutions Limited. (www.parasolsolutions.com) -- To u

Re: finding max value

2002-02-13 Thread Frank
choose the > >>maximal value. Is there any simple way of finding max? > > Don't think about it, > just use the CPAN module List::Util. > > Then you only have to write > my $max = max @values; ---end quoted text--- or: $max= (sort @values)[-1]; Personally, I'd p

Re: [Fwd: Returned mail]

2002-02-13 Thread Frank
? 3) Is this homework? -- Frank Booth - Consultant Parasol Solutions Limited. (www.parasolsolutions.com) -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: finding max value

2002-02-13 Thread Frank
On Wed, Feb 13, 2002 at 02:08:23PM +0100, Jon wrote: > Frank wrote: > > > > On Wed, Feb 13, 2002 at 01:17:50PM +0100, Andrea wrote: > > > In article <[EMAIL PROTECTED]> wrote >"Jeff 'Japhy' Pinyan" > > > <[EMAIL PROTECTED]>: &g

Re: urgent info required

2002-02-14 Thread Frank
;ve opted for the latter (4). The best advice I can _really_ give, and I hope it's not patronizing, is to spend some time phrasing your question, quite often you'll find the answer as you're writing the email; if not we're in a better postion to help. It saves time i

Re: print stock market page every so often

2002-02-14 Thread Frank
e pertinent stuff I'm not sure how mail works on NT but I'd check CPAN for that IIWY. -- Frank Booth - Consultant Parasol Solutions Limited. (www.parasolsolutions.com) -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: sorting an array

2002-02-18 Thread Frank
s including the use of Date::Manip > etc.. > no matter what I do the date is not sorted in descending order > (http://www.sampier.com/busted.php) ---end quoted text--- how-about splitting the fields and converting to an epoch time? you'll need Time::Local $epochtime=timelocal($sec,$min,$h

Re: Size of Array

2002-02-18 Thread Frank
if anyone has the proper > terminology on this, I'd appreciate it). try scalar(@array) or scalar(@{$array[0]}) perldoc perldata perldoc perllol -- Frank Booth - Consultant Parasol Solutions Limited. (www.parasolsolutions.com) -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Tk::FontDialog

2002-03-29 Thread frank
Hi. I' m trying to use the Tk::FontDialog package. I' ve installed and the only documentation i colud find is this: use Tk::FontDialog; $font = $top->FontDialog->Show; This just doesn' t work. I get this message from perl: wrong # args: should be "font actual font ?-displayof window? ?

Trailing spaces ... aka rtrim();

2001-06-28 Thread Frank Newland
All, I wish to remove trailing spaces.. #!/usr/bin/perl -w use strict ; my $line ; while (<>) { chomp $_ ; $line =~ s/\s+$//; # remove trailing spaces print " $line \n"; } My output is equal number of blank lines.. Where is my error? Frank

sed to perl

2001-07-19 Thread Frank Newland
s contains 6000+ lines and sed balks at such a large set of commands. How can I do this in perl? TIA, Frank -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

RE: sed to perl

2001-07-19 Thread Frank Newland
from Ed McMahon... Thanks Paul, Paul, and Randall for the feedback... Frank -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Thursday, July 19, 2001 1:21 PM To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: Re: sed to perl >>>>> "Frank" ==

Getopt::Long

2001-07-21 Thread Bicknell, Frank
ch Use of uninitialized value at stuff line 6. Stuff: <> $ Anyone seen this before? --- Frank Bicknell, Sysadmin Cisco Systems, Inc. (919) 392-3798 -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Time-out

2001-07-25 Thread Frank Newland
A Perl 5 liner... ** Schwartz et al's books as you know Get praises like one's listed below "The Leopard's divine", or "The Camel's much finer" But the Llama is numero uno!! -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMA

Pipe usage

2001-07-26 Thread Frank Newland
I want to print the contents of an archived file. When I run this script, all it does is uncompress my file. Q: 1. Isn't CONTENTS a file handle to the uncompressed file? 2. Why doesn't perl execute my while statement? 3. What should I do to print the contents of an archived file?

Destroying Database Handle

2001-07-30 Thread Frank Newland
Question about DBI I'm having success in preparing , executing and getting SQL output when I use DBI. What I want to do is ensure that I close properly. Q: What statement(s) do I need to prevent destroying database handle? Thanks, Frank *** #!/usr/bin/perl -w

Perl equivalent to awk's 'getline'

2001-08-09 Thread Frank Newland
print ; #print this record, now how do I capture just the next record? } ---- Thanks, Frank -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

cgi & syslog

2001-08-15 Thread Frank Wu
pt? Thank in advance Frank -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

cat a file

2001-04-19 Thread Drain, Frank
Hello, I am very new to perl. I have two pst (personal folder files) that I want to combine into one. I know how to use cat in Linux. How do do this same operation in perl under windows? Thank You, Frank Drain

Math::BigInt

2001-10-29 Thread Frank Newland
Readers, I've been to cpan.org site but some of the pages are not appearing. what does Math::BigInt do in the following perl line? $amount= Math::BigInt ->new("$posted_amount"); tia, Frank -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Regex syntax

2001-10-31 Thread Frank Newland
from $tempstring? ( I don't want to do the operation on $_ ) Thanks, Frank -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

RE: Off-Topic (200%) - Where are you from?

2001-11-09 Thread Frank Newland
Opelika, Alabama.. North of Beauregard, East of Lochapoka, South of Buffalo, West of Bleecker -Original Message- From: Etienne Marcotte [mailto:[EMAIL PROTECTED]] Sent: Friday, November 09, 2001 9:08 AM To: [EMAIL PROTECTED] Subject: Off-Topic (200%) - Where are you from? By reading t

Re: HELP - I am trying to connect to a MySql database

2001-11-14 Thread Frank Vanderborght
$servername , $username , $password) ; It's all there : perldoc DBD::mysql Can't find anything about the "or die ..." bit. Good luck , Frank. On Wed, 14 Nov 2001 12:43:52 +, "A Taylor" <[EMAIL PROTECTED]> wrote: >I am tring to connect to a MySql database a

i would like to learn to make a perl scripted auction

2001-11-14 Thread frank crowley
i need help in making a perl cgi scripted auction. = frank crowley __ Do You Yahoo!? Find the one for you at Yahoo! Personals http://personals.yahoo.com -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL

substr and =~ as one liner

2001-11-27 Thread Frank Newland
How can I express the following two lines as a one liner? === $left_trim = substr($_,85,13); $left_trim =~ s/^\s+// ; ## Remove leading spaces === tia frank -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

ActiveState Perl causes all of my scripts using Sybperl modules t ofail?

2001-12-18 Thread McCollum, Frank
see a difference in the file structure under the /Perl directory (obviously there are new files, but not related to SybPerl). Does anyone have any thoughts on this? or suggestions? Thanks, Frank -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

RE: Last line of file...

2001-12-18 Thread McCollum, Frank
I'm a beginner too, given, but alternatively, you could unshift the lines into an array and just check the last variable. This would allow you to reference the other lines later if there was more work to be done here. -Original Message- From: James Kelty [mailto:[EMAIL PROTECTED]] Sent:

RE: testing input/loops

2001-12-18 Thread McCollum, Frank
you have code at the bottom that tells it to loop back to the beginning if your response is not equal to a value between 1 and 3. So, it would continue to do this until you entered a valid value - or am I misunderstanding the question? > unless ($response eq '1' || '2' || '3') { >

RE: Can I change built-in @INC in a perl installation

2001-12-19 Thread McCollum, Frank
~1/Perl -Frank -Original Message- From: Song, Weidong (Weidong) [mailto:[EMAIL PROTECTED]] Sent: Wednesday, December 19, 2001 1:49 PM To: '[EMAIL PROTECTED]' Subject: Can I change built-in @INC in a perl installation > After perl is installed, the executable has the buil

HTML::Treebuilder

2001-12-19 Thread McCollum, Frank
table on that site, so that I can grab this table for later use. Thanks, Frank -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

HTML to text

2001-12-20 Thread McCollum, Frank
Does anyone know where to find resources on parsing textual content out of an HTML page? I am trying to grab values out of a table on a website. I can grab the table, but I am having trouble grabbing the actual values from it... Thanks Frank McCollum Bank Of America Securities, LLC [EMAIL

RE: CPAN and Perl

2001-12-20 Thread McCollum, Frank
And to get the file, John Krahn submitted an example below earlier tonight sub get_games_file { use Fatal qw(open close); use LWP::Simple; use HTTP::Status; my $URL = 'http://www.mcn.net/~kenpom/cbbgames.txt'; my $gamefile = '/home/jeff/games/myfile.txt'; my $rc = mi

substitution

2001-12-21 Thread McCollum, Frank
I want to replace a '%' symbol in a given string, but this string is not $_. Maybe this is a stupid question, but how do you specify the variable that you want the substitution to go against?? i.e. s/%//; # replaces any '%' signs in $_ with nothing but, I want to replace any '%' signs in $iAmA

Have a Perl White XMAS - Perl articles are of the highest quality

2001-12-21 Thread Frank Carlos
These Perl articles are of the highest quality. The complete developerWorks "Cultured Perl" series: A programmer's Linux-oriented setup http://www-106.ibm.com/developerworks/linux/library/l-plset/index.html?t=gr,p=PerlSetup Application configuration with Perl http://www-106.ibm.com/developerwo

RE: How to set @INC

2001-12-21 Thread McCollum, Frank
I never got a response for this, but I am pretty sure you can put the line below at the top of your script and it will search where-ever you would like... #!C:/Perl/bin/Perl.exe -I R:/SomeOtherDir/Frameworks/ Where the path after the '-I' tells the script to include this path as a 'search' path.

RE: substitution

2001-12-26 Thread McCollum, Frank
related question: I want to strip out any '*' symbols as well, and replace them with a zero. So, I changed my code to reflect: $origFee =~ s/[%\*]/0/; It appears that it strips out the % successfully, but anywhere I have a '*' symbol just gets overlooked. Any thoughts? -Original Message--

RE: Good CS Literature

2001-12-27 Thread McCollum, Frank
Learning Perl - O'reilly and assoc. is the best beginning programming book I have seen. Followed up with Programming Perl The other O'Reilly books seem to be good (i.e. Visual Basic for Applications) I've just started with Teach Yourself C++, and so far it has not been helpful at ALL. Maybe I

RE: @INC

2001-12-28 Thread McCollum, Frank
Rob Hanson sent this to me the other day when I asked a similar question. I had been using "-I C:/Path/Of/Library/" (I was later informed that this was more for use when using in-house modules) in the first line of my scripts, but he listed some alternatives that maybe more appropriate - see belo

RE: move

2001-12-31 Thread McCollum, Frank
I think the rename function is what you're looking for: rename "old", "new"; -Original Message- From: Michael McQuarrie [mailto:[EMAIL PROTECTED]] Sent: Monday, December 31, 2001 10:51 AM To: [EMAIL PROTECTED] Subject: move I'm sure this is a dumb question. It seems like one anyways.

RE: move

2001-12-31 Thread McCollum, Frank
I think 'system("mv", "/dir/file", "/dir2/file");', will only work if you have access to unix functions. system("mv", "/dir/file", "/dir2/file"); > -Original Message- > From: Michael McQuarrie [mailto:[EMAIL PROTECTED]] > Sent: Monday, December 31, 2001 10:51 AM > To: [EMAIL PROTECTED]

RE: remove spaces before and after . . . howdoi?

2002-01-03 Thread McCollum, Frank
>while (){ >$line = $_; >chomp($line); This can be shortened a few ways. i.e. chomp ($line = $_); There is probably a better way to get rid of the whitespace, but the only one that comes to mind is: s/^s+|s+$//; #replace any leading or ("|") trailing whitespace. -

RE: delete one column in table

2002-01-05 Thread McCollum, Frank
if you cannot ALTER TABLE, I find it quicker to do it as below (using Dave's example...): SELECT col1,col2 into tempTable from exampleTable This leaves off col3 data and retains formatting information for other columns, then you can do this: DROP exampleTable SELECT * into exampleTable from tem

not perl, but need some help with Linux...

2002-01-05 Thread McCollum, Frank
e and I am desparate now. -Frank -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

RE: not perl, but need some help with Linux...

2002-01-06 Thread McCollum, Frank
rt [mailto:[EMAIL PROTECTED]] Sent: Sunday, January 06, 2002 5:38 AM To: [EMAIL PROTECTED] Subject: Re: not perl, but need some help with Linux... Frank McCollum wrote: > Does anyone know where to get help if you destroy a computer while > installing Linux...? > > Problem (of cour

Adobe modules - append/'merge' pdf files

2002-01-07 Thread McCollum, Frank
the little tidbit about winnt.exe in the i386 folder for W2k), both platforms seem to be ready to go now. I really appreciate it. Thanks, Frank McCollum Bank Of America Securities, LLC [EMAIL PROTECTED] (704) 388-8894 -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-ma

@$

2002-01-07 Thread McCollum, Frank
{ print "Table (", join(',', $ts->coords), "):\n"; foreach $row ($ts->rows) { print @$row; print join(',', @$row), "\n"; } } Thanks, Frank McCollum Bank Of America Securities, LLC [EMAIL PROTECTED] (704) 388-8894 -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

RE: date compare problems

2002-01-07 Thread McCollum, Frank
strings. -Frank -Original Message- From: Alex Harris [mailto:[EMAIL PROTECTED]] Sent: Monday, January 07, 2002 12:26 PM To: [EMAIL PROTECTED] Subject: date compare problems Ok so I'm REALLY REALLY a newbie and this next question is going to sound like "where's the spoon&

substitute all non-digits with ''. I think I saw this posted recently, but I could not find it...

2002-01-07 Thread McCollum, Frank
I want to take all non-digits and drop them out of my string. I would think it would be something like... s/!(\d+)//; but this is not the case Frank McCollum Bank Of America Securities, LLC [EMAIL PROTECTED] (704) 388-8894 -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional

RE: substitute all non-digits with ''. I think I saw this posted recently, but I could not find it...

2002-01-07 Thread McCollum, Frank
Aha. That is very familiar. Thx. -Original Message- From: Tanton Gibbs [mailto:[EMAIL PROTECTED]] Sent: Monday, January 07, 2002 2:54 PM To: McCollum, Frank; [EMAIL PROTECTED] Subject: Re: substitute all non-digits with ''. I think I saw this posted rec ently, but I could n

RE: global substitution

2002-01-07 Thread McCollum, Frank
$record =~ s/[\.\-]//g; if it is a '.' or a '-' replace it with nothing. Actually, I don't even think the [] is necessary, so it could just be: $record =~ s/\.\-//g; -Original Message- From: Scott [mailto:[EMAIL PROTECTED]] Sent: Monday, January 07, 2002 4:02 PM To: [EMAIL PROTECTED] Su

  1   2   3   >