Re: File Handling question - easy

2001-08-02 Thread Jon
Bob-Mike-Jerry, Thanks guys Jon At 01:36 PM 8/2/01 -0500, Jerry Preston wrote: >Jon, > >Read all the files in the directory then go through them based on the >file ext >and do what you want. > > opendir( PROGRAM, "./" ); > foreach $program ( readdir( PROGRA

RE: File Handling question - easy

2001-08-02 Thread Jon
Bob, I got it from "Perl Black Book" by S. Holzner, section on globs. Very very good book to learn Perl from, extremely easy to read, excellent for beginners and I'm not going to know this for a long while but I think it is an excellent book for intermediate Perl dudes too. End of section rea

File Handling question - easy

2001-08-03 Thread Jon
roblem is, I want to do this for a bunch of different patterns (ex. ".txt", ".this", ".that"). How can I make what is inside the angle brackets a variable? I've tried to use eval to build my while statement and I can't make it work. Help Please? whi

Re: PERL IS NOT A HIGH LEVEL LANGUAGE

2001-08-17 Thread Jon
ink I will just need to refer them to this section to show them a quick overview of a small part of what Perl is about. And then ask them to sign up. Jon At 01:27 PM 8/17/01 -0400, Kevin Meltzer wrote: >It amazes me when people in acadamia can be so non-academic. If I were >you, I would

Re: PERL IS NOT A HIGH LEVEL LANGUAGE

2001-08-17 Thread Jon
ll sign up for the Perl Certificate course that they are teaching along side C++ Jon of Arc At 03:29 PM 8/17/01 -0700, [EMAIL PROTECTED] wrote: >Jon and List: > >Sometimes in life it is necessary to fight back, not because it is a good >exercise, but rather to try to cor

Re: how to open a .iso file

2001-09-19 Thread Jon
Ditto. If you don't like spam quit hanging in the canned good section. You need to realize that RC might not be signed up with the ".iso" mailing list so he might choose to reach out to some of these more well trafficked maillists for friendly queries. I don't have a problem with that. No

Re: how to open a .iso file

2001-09-19 Thread Jon
;Aloha, >mel Ah-Looo-HA! (Originally from Kalihi Valley). My apologies to all the people who have to read all this and delete it (wasted time), I know there are more important things to do; but writing all this was the most important thing for me to do at the time. Please to not

Re: Adding new path to @INC

2003-01-21 Thread Jon
or #! /usr/bin/perl -w use lib qw(/path/to/your/stuff) - Original Message - From: <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Monday, January 20, 2003 4:14 PM Subject: RE: Adding new path to @INC Sure. #!/usr/local/bin/perl BEGIN { unshift (@INC, "Your/p

Re: converting MS access DB to mysql

2001-06-19 Thread Jon Farmer
d with MySQL get the ODBC driver and link the tables. Regards Jon Farmer Entanet International Ltd www.enta.net Tel 01952 428969 Mob 07050 603720 PGP Key Available

referencing a flat file DB

2001-06-28 Thread Jon Riddle
u for your help! Jon Riddle Interactive Gallery Inc. Phone- 818-501-4486 ext. 3037 Email- [EMAIL PROTECTED] "The three great virtues of a programmer are laziness, impatience and hubris. Larry Wall " #!/usr/local/bin/perl -w use CGI; use CGI::

RE: referencing a flat file DB

2001-06-28 Thread Jon Riddle
program. So, thanks again for the help and very constructive criticisms. One day, I will be the mentor! P.S., I would give out a user name and password, but the likeliness of their being underage participants in this forum is too great. Jon Riddle Interactive Gallery Inc. Phone- 818-501-4486 ext. 3037

RE: Is there an alternative to CGI ???

2001-07-11 Thread Jon Farmer
> > Personaly, i like ASP for the fact you can do <%=$var%> > instead of php's print $var; ?> > Works fine in PHP Regards Jon

HELP!!! What's wrong with my app.??

2001-07-19 Thread Jon Grant
attach the logfile and application as text files. I would be very grateful if someone could have a look through my work and suggest where it is going wrong or suggest some alternatives. Any help will be very gratefully appreciated! Cheers, Jon. #!perl # Program for the navigation system use

PERL IS NOT A HIGH LEVEL LANGUAGE

2001-08-17 Thread Jon Acierto
Hello Guys It's me again, After getting all the feedback from this maillist on my "High Level" question AND going to an online dictionary and finding out that Perl Does fit the definition of a high level language, I get this from the Admissions Councellor at the U.W. ext.: Jon

Re: PERL IS NOT A HIGH LEVEL LANGUAGE

2001-08-19 Thread Jon Acierto
update the list on the issue...and brother Romani: I contacted and got a reply from Dr. Tim Maher, the resident Perl Guru on the U.W. advisory board (Tim, sorry to quote you without your permission...but you don't seem the "suing" type) this is what he had to say: snip Jon, I

Re: PERL IS NOT A HIGH LEVEL LANGUAGE

2001-08-19 Thread Jon Acierto
t; I'm getting tired of this thread... let's talk about regexp's... > > - Original Message - > From: "Ray Barker" <[EMAIL PROTECTED]> > To: "Jon Acierto" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> > Sent: Saturda

Re: PERL IS NOT A HIGH LEVEL LANGUAGE

2001-08-19 Thread Jon Acierto
Wow Greg I like it! *Rejected* (hehe, it might be nice to be able to register in any school in the area after all is said and done) - Original Message - From: Greg Meckes <[EMAIL PROTECTED]> To: Jon Acierto <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Saturday, August

Re: PERL IS NOT A HIGH LEVEL LANGUAGE

2001-08-19 Thread Jon Acierto
pass this message on to "Will" and any others you feel should be taking part in this discussion. Jon Acierto's troubled attempt to have his Perl background recognized as high-level programming experience for the purpose of admission to "Foundations of C++" ha

Passing References To Subroutines

2001-08-29 Thread Jon Williams
onfused about hashes than I am about arrays. How do I de-reference the hash-reference so that I can use it in my subroutine - similar to the @$that_array example used above (but for hashes instead). Hopefully my question makes sense. Thanks in advance of your help. Jon Williams.

introduction and first question

2001-04-22 Thread Jon Tillman
;$line\n"; } } close (FILEIN); close (FILEOUT); if ($changed) { unlink("$dir/$file"); link("$dir/${file}.jonnew", "$dir/$file"); unlink("$dir/${file}.jonnew"); } else { unlink("$dir/${file}.j

Can you setuid root from Perl?

2001-10-22 Thread Jon Cassorla
Anyone know if you can setuid root from a perl program or module? Jon Cassorla -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

RE: Persisting Values Across Method Calls

2001-10-31 Thread Jon Cassorla
There are many ways to do this. Here is just one example using a closure. package Remember; # this is a closure { my $savedData = 0;# only accessible within this scope; side effect is that # it stays around as long as the module since the following

Carp and XML::Parser and INIT, oh my

2001-11-13 Thread Jon Cassorla
I ran into a problem using the Carp module in an INIT block while using the XML::Parser module. It seems as though there is something uninitialized within the module until after the INIT block. Once my INIT block is completed, all is well. Anyone understand why using it is problematic here? I

Inheritance frustration

2001-11-15 Thread Jon Cassorla
For some reason I have a problem with inheritance if the derived object using full namespace for the base object in the ISA. In the following, B derives from A. The directory structure is such that A.pm lives in the same directory as B.pm A.pm #!/usr/local/bin/perl package A; sub foo

So many lists!

2001-11-15 Thread Jon Topper
blems with the interpreter's dynamic linking which I've been thus far unable to figure out from the documentation or extensive web searches. Basically my question for this list is: which list would I use to get some help with my question? :) Regards, -- Jon Topper

cgi

2001-11-26 Thread Jon Howe
Is possible to have a cgi-perl script return the html form values + names, in the same order in which they appearfo in the html rm supplying the post with out having to refer to each hash/array element. An example of what I am Woking with : ## /usr/bin/perl -w use CG

Fw: mail attachments

2001-12-04 Thread Jon Howe
Hi all I have nicked this script from http://alma.ch/perl/Mail-Sendmail-FAQ.htm#attachments The thing is all works well except for the fact the attachment arrives named as perl(somenumber.kb) Does any one no how I can name the attachment the same as the value passed to file handle F by $file

eval scope

2001-12-10 Thread Jon Molin
when i run the script with row (<--- ODD ROW) it works fine: bash-2.04$ perl constant.pl Oct -> 10 Dec -> 12 Mar -> 03 Feb -> 02 Jan -> 01 Nov -> 11 May -> 05 Aug -> 08 Sep -> 09 Jul -> 07 Apr -> 04 Jun -> 06 HASH(0x80f8270)=12 but if i remove that line i get: bash-2.04$ perl constant.pl HASH(0x80f8270)= ie it doesn't seems to find the variable...This seems like vodoo to me. Can anyone explain or point me to a place with an explanation? /Jon -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Module download

2001-12-12 Thread Jon Molin
Have you tried CPAN.pm? /Jon Daniel Falkenberg wrote: > > Hello All, > > I don't know if this is possible but I want to be able to have a Perl > script check my server for modules that I need in my script. If the > modules don't exist. > > Is there

Re: fun with regex/split

2001-12-12 Thread Jon Molin
i bet there's way of doing this on one line: my $a = '"one two" three "four five six" seven eight nine'; my @ar = ($a =~ /((?:\"[^\"]*\"|[^\s]*))\s?/g); #should be possible to remove " s/\"//g foreach (@ar); print "$_\n"

Re: Database access

2001-12-13 Thread Jon Molin
You can if the database is accessible from the webserver. Read about apache (www.apache.org) and perl (www.perl.org), especially the modules CGI.pm and DBI.pm. /Jon Allison Davis wrote: > > Can anyone tell me if you can have all the members of our origanization > access our databa

Re: help any with hash

2001-12-13 Thread Jon Molin
s. if you split the line with keys my @keys = split (/\t/, $key_row); # i assume it's tabs ; #throw line with junk my @values = split (/\t/, ); # again tabs? my %hash; for (my $i = 0; $i <= $#keys;$i++) { $hash{$keys[$i]} = $values[$i]; } print STDERR "$_ -> $hash{$_}\n" f

Re: Capturing STDOUT of system launched process

2001-12-13 Thread Jon Molin
cmd 2>/dev/null`; # throw away stderr # $res is only stdout and no errors shown /Jon insomniak wrote: > > Hi, > You can always write STDERR and STDOUT to a temp file then read the contents > of this file back in to your script. > > eg > system (some_command 1>.stdout 2>

Re: File date/time stamp

2001-12-13 Thread Jon Molin
stat is what you want, 'man perlfunc'. ($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size, $atime,$mtime,$ctime,$blksize,$blocks) = stat($filename); /Jon Michael Pratt wrote: > > Hello, > > How do I get a file date time sta

Re: command-line way to search contents of files

2001-12-14 Thread Jon Molin
check man perlrun im not sure what you're after, if it's just grep i'd suggest find . -type f -exec grep foo {} \; if you wanna do something about foo find . -type f -exec perl -pi -e 's/foo/bar/g' {} \; /Jon "Thomas S. Dixon" wrote: > > Greetings gu

Re: Need regex

2001-12-17 Thread Jon Molin
read perldoc -f substr /Jon Jorge Goncalvez wrote: > > Hi, I wanted to have the first 5 elements of a scalar, like for exemple: > my $number= E14011 > > my number2=E1401 > > How can i do this in Perl, thanks? > > -- > To unsubscribe, e-mail: [EMAIL PROTEC

Re: Count number of characters

2001-12-17 Thread Jon Molin
perldoc -f length :) /Jon Jorge Goncalvez wrote: > > How can I count the number of characters of a string ? > Thanks > > -- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] -- To unsubscribe, e-mail: [EMAIL PROTECTED] Fo

Re: ARGV

2001-12-18 Thread Jon Molin
rmal' perl so you should read some about it, why not perldoc CGI? Good luck /Jon > Mike > > -- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Remove a line

2001-12-19 Thread Jon Molin
lete = 7; open (F, 'some_file'); my @file_content = ; close (F); open (F, '>same_file'); for (0..$#file_content) { next if $_ == $line_to_delete; print F $file_content[$_]; } close (F); /jon ps check the docs with perldoc perl, www.perl.org and so on, read about files...

Re: Data through the parallel port

2001-12-20 Thread Jon Molin
about your progres /Jon Stanislav Zahariev wrote: > > Hi, I was just wondering, can I send data through the parallel port using perl? And >If yes, how ? With some kind of a module ? And where can I read more about it? Thanks >for any help provided :)) -- To unsubscribe, e-mail:

RE: Multiple implementations of an interface

2001-12-26 Thread Jon Cassorla
You can accomplish this using some pretty basic OO patterns. You want your client to be ignorant of the implementation of the module with which it is talking (except to say that it will conform to a particular interface). Also, you may want to client to be ignorant of the which module to create

Grep Help - Files - Leading Zeros ??

2002-01-03 Thread Jon Shoberg
The leading zero in some file names have been a pain in my side. They're dated in YMD.log format such as 010623.log (2001/June/23rd) 011212.log (2001/December/12th) Any suggestions on modding the block of code below so I can "print join" all of the year 01 files from 06 to 12 ? Its that

Re: Calling a perl script with a perl script

2002-01-04 Thread Jon Molin
o I go about doing it? Your help would be greatly >appreciated. it's not possible for you to import the code with use/require? if not use my $output = `perl testprog.pl`; /Jon > > Thanks, > Hubert -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Date and time.

2002-01-04 Thread Jon Molin
would be greatly appreciated. perldoc -f localtime perlfunc perldoc -f time perlfunc is that what you're after? /Jon > > Thank you, > Mark-Nathaniel Weisman A+, MCP, CNA, MOUS MI > Network Systems Administrator > Career Academy > Anchorage, AK > > -- > To unsu

Re: Print / overwrite line

2002-01-04 Thread Jon Molin
"John W. Krahn" wrote: > > Gary Hawkins wrote: > > > > How can I clear a line before replacing it? > > > > Am doing \r and overwriting, but sometimes the text that was there previously > > is longer than the new text. > > Pad the shorter lines with spaces. For example: > > printf "\r%-20s", $s

using regular expressions to find sequences of items in data

2002-01-06 Thread jon hans
#!/usr/bin/perl ### I am trying to find all of the reoccurring sequences excluding the sub sequences. Maybe I am missing the obvious, but having a little perl exposure and not being an expert perl programmer I have hacked together some code tha

Re: Query

2002-01-07 Thread Jon Molin
es in perl program i.e.. *.pl > > Regards > > Manish U. You'll need some reading, check out http://search.cpan.org/search?mode=module&query=thread and http://learn.perl.org/ also, please cut the lines at 72-78! /Jon -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Searching for a book...

2002-01-07 Thread Jon Molin
ry detailed. I'm oriented in >programming net stuffs with perl. Thanks in advance. take a look at http://learn.perl.org/ an

Re: Searching for a book...

2002-01-07 Thread Jon Molin
ng lines. Also, perhaps you saw that i sent a link with many books? /Jon > > Take a look at the FAQ section 2.3, bullet point 1 and chill out. > > /John ;) > > -Original Message- > From: Jon Molin [mailto:[EMAIL PROTECTED]] > Sent: 07 January 2002 16:32 > To

Re: Hash of hash of array

2002-01-09 Thread Jon Molin
arrayrefs in it, here are some ways to reach the values: my $scalar = $data{user}{file1}->[0]; # get value 0 in the file1 array my @array = @{$data{user}{file1}}; # dereferens the array and put it in @array my $array_ptr = $data{user}{file1}; # get the arrayref and reach the values by $array_ptr-&g

Re: help with Net::POP3

2002-01-09 Thread Jon Molin
You need to call $handle->quit (); /Jon Cabezon Aurélien wrote: > > Hi list, > > I'm playing around Net::POP3. > I wanna make a script that is able to check for pop3 mail and then save them > in a MySQL database (not implemented yet, usefull for mailing archiving)

Re: split, ignoring spaces

2002-01-09 Thread Jon Molin
"Hanson, Robert" wrote: > > It sounds like you might have multiple spaces between some elements. > > Try this... > > @date = split(/\s+/,$date); but it will also split on \n,\t so / +/ would be better if it's just space you wanna split on /jon > >

Re: reading from directories => no values

2002-01-09 Thread Jon Molin
ot;the_dir") || die "opendir: $!"; rewinddir(IN); while ($_ = readdir (IN)) { if (m/^\.{1,2}$/ or m/'.foo'$/) { print STDERR "wrong file ($)\n"; } else { print STDERR "here's a file ($_)\n"; } } to see if it ever

Re: Compile .cgi programs

2002-01-10 Thread Jon Molin
Take a look at 'perldoc CGI.pm' Perhaps you should buy a book as well? Or read the online documentation? I can recomend 'learning perl'. /Jon kondreddy Rama koti Reddy wrote: > > Dear Friends, > can u tell me, how can i create an executable > file for the

Re: interesting JAPH, how does this work?

2002-01-10 Thread Jon Molin
[EMAIL PROTECTED] wrote: > > Try this: > > #!/opt/local/bin/perl > #!/usr/bin/perl > my $A="a"; > for(0..285074){ > $A++; > print" $A:"; perhaps you should consider NOT printing that 285074 times? would kinda flood the term :) > } > print"\n\n$A\n"; > > --

Re: Compile .cgi programs

2002-01-11 Thread Jon Molin
possible to get the codes, what you need then is crypto what you want (http://search.cpan.org/search?mode=module&query=crypt) Or did i totaly misunderstand you? Also, please do NOT crosspost. /Jon kondreddy Rama koti Reddy wrote: > > Dear Friends, can u tell me, how can i create an exe

Re: return code

2002-01-11 Thread Jon Molin
here are two ways: my $exit_code = system ($cmd); system ($cmd); print "exit code = $?\n"; /Jon Ahmed Moustafa wrote: > > Hi All, > > I'm calling a Java application using "system". How can I know the return > code of the called Java application? &g

Regexp Help !!!

2002-01-13 Thread Jon Shoberg
p/World/America" and "Top/World/Japan". Then I would do the same for "Top/World/Japan" and get "Top/World/Japan/Economy" and then "Top/World/Japan/Food". This is part of the program so I can count the number of "/" in the query/filter string. I

RE: Regexp Help !!!

2002-01-13 Thread Jon Shoberg
Thanks ! Glad I asked for some other thoughts on this. I totally over looked this and given how my indexes are setup, this will work much better. Thanks again, Jon -Original Message- From: Carsten H. Pedersen [mailto:[EMAIL PROTECTED]] Sent: Sunday, January 13, 2002 11:26 AM

regexp hangs in perl 5.005_03 but not 5.6

2002-01-17 Thread Jon Molin
) = 6 brk(0x80d2000) = 0x80d2000 /Jon -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: catching an exception before it reaches command line

2002-01-17 Thread Jon Molin
have BEGIN { open (STDOUT, '>>/some/log/file') } if you want it to file otherwise do, open (STDOUT, "<&STDERR"); and with shellstuff, > redirects stdout, 2> redirects stderr so system ("ls /apa >/dev/null 2>&1"); redirects both o

Re: how to set the env var?

2002-01-18 Thread Jon Molin
dbh = DBI->connect($data_source, $username, $password, \%attr) || die $DBI::errstr; /Jon yun yun wrote: > > I programmed a .pl use DBI, but it says that " > > Can't connect(DBI::Access::db1 HASH(0x1aff0bc)), no > database driver specified > and DB

Re: using the system function

2002-01-18 Thread Jon Molin
if you aren't interesed in weather it works or not, why not try system("/usr/local/bin/scp file $system:/home &"); /jon lospalomares wrote: > > I am trying to scp a file to various systems, but the > script hangs if the scp command to one of the systems > fa

Re: perk-tk.rpm

2002-01-22 Thread Jon Molin
did you try at cpan? http://search.cpan.org/ /Jon richard noel fell wrote: > > I have been unable to find a source for the tk module. My google > searches have been fruitless. Does anyone have a pointer to a tk.rpm for > redhat linux 7.1? > Thanks, > Dick Fell > > --

Re: What's wrong with this?

2002-01-24 Thread Jon Molin
Jorge Goncalvez wrote: > > Hi, I have this: > #!/usr/local/bin/perl -w > use Win32::Registry; > my $Register ="Software"; > #my $Register2=".DEFAULT\\Software"; > my $hkey; > my @array= qw($HKEY_LOCAL_MACHINE $HKEY_CURRENT_USER ) ; > > foreach (@array) i don't know this windows module but i gue

Re: csv flat file

2002-01-24 Thread Jon Molin
t;insert ", then it comes out of the "for each" loop thingy...? perl -pi.bak -e 's/^/insert /' filename would do it (remove .bak if you don't want a backup) /jon -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Processing a text file

2002-01-25 Thread Jon Molin
perldoc. If you're not interested in learning, im sure there's a consultant you could hire to solve this problem for you, eventhough 1 hr of reading should give you the knowledge needed. /Jon > Morgan. > -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Code Format Question

2002-01-25 Thread Jon Molin
us = 6; } } but i think what you wrote can be considered following some kind of codestandard pretty widely adepted. /Jon > Any comments are welcome. > > Thanks, > Darryl > > -- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: please Help ! Database connection

2002-01-25 Thread Jon Molin
or do: print "Content-type: text/html\n\n"; /Jon John Edwards wrote: > > This looks like your script isn't returning the correct HTML headers. It's > not a database connection fault. I would strongly suggest using the CGI.pm > module. This provides an easy inter

Re: SSL and HTTPS

2002-01-29 Thread Jon Molin
You have the best(tm) webserver out there: www.apache.org, you can add mod_ssl to it and there you go. An alternative could be http://www.apache-ssl.org/ (not the same as apache with mod_ssl) /Jon Gary Hawkins wrote: > > CommerceSQL uses Perl and needs https, secure server. I a

Re: listing files

2002-01-29 Thread Jon Molin
erhaps the File:: modules suits you better: http://search.cpan.org/Catalog/File_Name_Systems_Locking/ I'm not sure what a listbox is, if it's a html thingy then you should look at CGI.pm and template modules. /jon > > Can someone help? > > Mike > > -- > To

Dereferencing eval-generated hashes

2002-01-30 Thread Jon Howe
I have installed the AppConfig In an attempt to try and write my own config files I have got this far: #!/usr/bin/perl -w use AppConfig qw/:argcount/; #use strict; use Data::Dumper; $| = 1; my $config = AppConfig->new(); $config->define( 'VER' => { ARGCOUNT => ARGCOUNT_L

Re: Matching text

2002-02-01 Thread Jon Molin
ce followed by 0-* nonspace chars. it puts the nonspace cars, ie the username in $1 since we hve the () around that part. you should read the documentation at 'perldoc perlre' and/or read books about perl. My guess is that it'd take you 5 mins of reading in learning perl to solve th

Re: perl database access

2002-02-01 Thread Jon Molin
I'm not sure i follow you but if you use localhost or leave the host blank it'll try localhost... /Jon Jefferson Ryan Lee wrote: > > Hi, > > Are there any way to access a database (SQL Server) not using the ODBC? > It is possible for a perl script to query

Re: [ma-linux] Just when you thought you are done, the - is there - appears

2002-02-01 Thread Jon Molin
I guess geoff is in the ma-linux list, not in here since the only things i can find in this thread is 3 posts by you. Kinda hard to offer better(tm) sollutions when you don't know what's been suggested before...Perhaps you should try NOT cross-posting? /Jon [EMAIL PROTECTED] wrote: &

Re: UFO (Unidentified Formatting Observation) on the web....

2002-02-01 Thread Jon Molin
it's pod, do 'perldoc module' and 'perldoc perldoc' /jon Ron Goral wrote: > > I have a very beginner's question. I've just been looking at the code for a > library file and noticed some, to me, very peculiar things. First, there is > text t

Re: use lib question

2002-02-05 Thread Jon Molin
use BEGIN: perl -e 'BEGIN {if (`pwd` =~ /some_path/){use lib ("/usr");}else{use lib ("/home");}}' i usually unshift @INC but i've heard that's not a good way to do it, not sure why though. /Jon "Kingsbury, Michael" wrote: > > I want t

Re: In-line editing..

2002-02-07 Thread Jon Molin
ile;some_app weird_uneditable_file;mv weird_uneditable_file.bak weird_uneditable_file would that 'line' not work for you? /Jon -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Never had this happen before!

2002-02-07 Thread Jon Molin
[EMAIL PROTECTED] wrote: > > I was happily programming, getting close to the end of my project just trying > to figure out table placement in html within my largest function on the page. > > All of a sudden my function won't function! I didn't change any of the perl > code! And it was fine exc

Re: File Attributes

2002-02-07 Thread Jon Molin
There's some good documentation about this at: perldoc -f chmod /Jon Roman Hanousek wrote: > > I can't remember how, But how do i change the attribute of a file from read > only to writable and then back gain.

Set Restriction/Requirement for

2010-02-20 Thread Jon Forsyth
Hello, How can I set a requirement for (e.g. require the to continue running the program)? Thanks, Jon

Syntax of Foreach loop

2010-03-30 Thread Jon Forsyth
um = 0; state @numbers; foreach my $number ( @_ ) { push @numbers, $number; $sum += $number; } say "The sum of (@numbers) is $sum"; } Thanks, jon

Line number

2004-05-27 Thread Jon Herbry
Hi, anybody have idea find the number in a file? Assume I create a file call "sample" and have content below: Hi, Jame where are you? How old are you? when you free? can you coming my home? - assume if i want know string w

emacs and perl

2004-10-14 Thread Jon Mosco
I was wondering if anyone had some advice or pointers for perl and emacs. I want to be able to run my programs in a window similar to the way you can with 'compile' mode with c. If anyone has some tips or pointers, please let me know. Jon M. P.S. I already know about eshell an

Re: emacs and perl

2004-10-15 Thread Jon Mosco
works ok, but it would be nice to run my code to see how it functions while im writing. Thats what im trying to figure out here. Thanks, Jon On Thu, Oct 14, 2004 at 11:01:40AM -0400, Steve Bertrand wrote: > > On Wed, 13 Oct 2004 22:24:11 -0500, Jon Mosco <[EMAIL PROTECTED]> >

Setting a Hash Using the Contents of a File

2005-02-16 Thread Jon Mathews
Not sure how else to word this. Basically, I have a util which reads a config file to set metadata which is kept finally in a HOH. I want to support another form of the config file, though, which may be less flexible, but is easier to read. Here is some example code which shows my progression

Re: Setting a Hash Using the Contents of a File

2005-02-22 Thread Jon Mathews
- Original Message - From: "John W. Krahn" <[EMAIL PROTECTED]> To: "Perl Beginners" Subject: Re: Setting a Hash Using the Contents of a File Date: Mon, 21 Feb 2005 12:39:25 -0800 > Finally, a bite - but I'm done a'ready. > Jon Mathews

Re: Setting a Hash Using the Contents of a File

2005-02-22 Thread Jon Mathews
- Original Message - From: "John W. Krahn" <[EMAIL PROTECTED]> To: "Perl Beginners" Subject: Re: Setting a Hash Using the Contents of a File Date: Tue, 22 Feb 2005 14:04:35 -0800 > > Jon Mathews wrote: > > From: "John W. Krahn" <[EMAIL

loop through a log file

2007-02-06 Thread Jon W
m to get what I actually need? For the above output, all I really wanted is to print out "c:\disk1\test22.exe", as that test had the particular failure output. Thank you, Jon -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Re: loop through a log file

2007-02-07 Thread Jon W
y $logfile = 'test.log'; open LOG, $logfile or die "Couldn't open $logfile: $!"; my @test; my $error; while () { if (/^START/ .. /^FINISH/) { push @test, $_ ; $error = 1 if /LOOKING FOR THIS STRING/; } if (/^FINISH/) { if ($error) { print @test; undef $error; } undef @test; } } Thank you to everybody for the help! I had something written very close to this at one point, but never quite made it work properly. -Jon -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Re: How to determine web user's location

2010-09-15 Thread Jon Hermansen
Hi Mimi,  Determining a city from an IP address is documented on the Geo::IP2Location CPAN page: > use Geo::IP2Location; > my $obj = > Geo::IP2Location->open("IP-COUNTRY-REGION-CITY-LATITUDE-LONGITUDE-ZIPCODE-ISP-DOMAIN.BIN"); > my $city = $obj->get_city("20.11.187.239"); http://search.cpan.org/

Re: Incorrect handling of very small doubles?

2010-09-20 Thread Jon Hermansen
Hi Abu, This code works for me: #!/usr/bin/perl my $d1, $d2, $sum; $d1 = 6.892964 * 10 ** -309; $d2 = 1.102874 * 10 ** -307; $sum = $d1 + $d2; printf("d1 = %e\n", $d1); printf("d2 = %e\n", $d2); printf("sum = %e\n", $sum); On Mon, Sep 20, 2010 at 1:30 PM, Abu Yoav wrote: > Hi, > > I wanted

Re: Incorrect handling of very small doubles?

2010-09-21 Thread Jon Hermansen
a bug. On Tue, Sep 21, 2010 at 10:25 AM, Abu Yoav wrote: > Hi Jon and Shlomi, > > Thanks! > > Jon: > Actually, in my case, it's a bit more complicated than that. I read the > numbers from a file, and there they are in the standard C notation that I've > used in m

Trap syntax error inside eval?

2010-09-30 Thread Jon Hermansen
27;__WARN__'}; > no warnings 'all'; > to no avail. Would someone kindly help me out? Thanks, Jon

Re: Trap syntax error inside eval?

2010-09-30 Thread Jon Hermansen
On Thu, Sep 30, 2010 at 8:34 PM, C.DeRykus wrote: > On Sep 30, 7:37 pm, jon.herman...@gmail.com (Jon Hermansen) wrote: > > Hey all, > > I have this block of code: > > > > sub is_valid_xml { > > > > > my ($content) = @_; > > > >

Re: Replace digit by equivalent in words.

2010-10-12 Thread Jon Hermansen
Hi Pawan, For converting integers to their English equivalents, use Lingua::En::Inflect. # http://search.cpan.org/~dconway/Lingua-EN-Inflect-1.892/lib/Lingua/EN/Inflect.pm#CONVERTING_NUMBERS_TO_WORDS On Tue, Oct 12, 2010 at 8:16 PM, pawan kumar wrote: > Hi Folks, > I need an help.I

Word Frequency Script

2011-06-08 Thread Jon Forsyth
}\n" I get the count for that word. Thanks, Jon

Re: suggest me a perl script

2011-07-12 Thread Jon Hermansen
Should be trivial to do in Perl (I won't provide code), but I always use sed for jobs like these: $ echo 'A,1,B > > > A,2,B > > > B,3,C > > > B,1_1,A > > > A,2,D > > > C,3_3,B > > > B,2_2,A > > > D,2_2,A' | sed 'N; s/\n/: /' > > A,1,B: A,2,B > > B,3,C: B,1_1,A > > A,2,D: C,3_3,B > > B,2_2,A: D,2_2

Perl Regex with unix grep command

2011-09-03 Thread Jon Forsyth
matches the shorter string without the dollar sign if I leave \$ out. Thanks, Jon

Getting text from an XML file using XML::Twig

2011-12-03 Thread Jon Forsyth
teDBrow } ); $t->parsefile( 'doc.xml'); sub writeDBrow { my( $t, $elt)= @_; print $elt->text;# print the text (including sub-element texts) # Insert Code to write to a Database here $t->purge; # frees the memory } - Thanks, Jon

  1   2   >