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
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
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
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
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
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
;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
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
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
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::
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
>
> Personaly, i like ASP for the fact you can do <%=$var%>
> instead of php's print $var; ?>
>
Works fine in PHP
Regards
Jon
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
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
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
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
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
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
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.
;$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
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]
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
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
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
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
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
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
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]
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
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"
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
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
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>
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
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
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
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
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]
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...
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:
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
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
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]
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
"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
#!/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
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]
ry detailed. I'm oriented in
>programming net stuffs with perl. Thanks in advance.
take a look at http://learn.perl.org/ an
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
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
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)
"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
>
>
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
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
[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";
>
> --
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
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
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
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
) = 6
brk(0x80d2000) = 0x80d2000
/Jon
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
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
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
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
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
>
> --
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
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]
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]
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]
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
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
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
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
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
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
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:
&
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
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
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]
[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
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.
Hello,
How can I set a requirement for (e.g. require the to
continue running the program)?
Thanks,
Jon
um = 0;
state @numbers;
foreach my $number ( @_ ) {
push @numbers, $number;
$sum += $number;
}
say "The sum of (@numbers) is $sum";
}
Thanks,
jon
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
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
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]>
>
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
- 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
- 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
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/
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/
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/
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
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
27;__WARN__'};
> no warnings 'all';
>
to no avail. Would someone kindly help me out? Thanks,
Jon
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) = @_;
> >
> >
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
}\n" I get the count for that word.
Thanks,
Jon
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
matches the shorter string
without the dollar sign if I leave \$ out.
Thanks,
Jon
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 - 100 of 159 matches
Mail list logo