Re: Benchmark for Scala, Ruby and Perl

2022-01-15 Thread Jon Smart
/ Can you give the further suggestion on this? Thank you a lot. regards Jon -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/

Re: Benchmark for Scala, Ruby and Perl

2022-01-15 Thread Jon Smart
ot; end On Sat, Jan 15, 2022 at 3:48 AM Paul Procacci wrote: Hey John, On Sat, Jan 15, 2022 at 3:04 AM Jon Smart wrote: Hello Paul Do you mean by undef $/ and with <$fh> we can read the file into memory at one time? In most cases the short answer is yes. I have problems with yo

Re: Benchmark for Scala, Ruby and Perl

2022-01-15 Thread Jon Smart
the syntax "<:mmap"? Thank you. On 15.01.2022 15:45, Paul Procacci wrote: Hey Jon, The most glaringly obvious thing I could recommend is that at least in your perl routine (and probably the other languages) most of your time is context switching reading from the disk. Now, my perl

Benchmark for Scala, Ruby and Perl

2022-01-14 Thread Jon Smart
Hello, May I show the result of my benchmark for perl5, ruby, and scala? https://blog.cloudcache.net/benchmark-for-scala-ruby-and-perl/ Welcome you to give any suggestion to me for improving this. Thanks. -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail

Re: Script to fork, send data to parent via a tcp conn

2016-05-14 Thread Jon E Price
Perhaps port 8989 is in use? Have you tried >telnet 127.0 0.1 8989 Can you connect? On May 14, 2016, at 3:56 PM, Unknown User wrote: >I wrote this scrpt to fork off a few child processes, then the child >processes process some data, and send the data back to the parent >through a tcp socke

Re: Regex behavior in command line

2012-06-07 Thread Jon Forsyth
I overlooked the missing single quotes, Thanks! -Jon

Regex behavior in command line

2012-05-31 Thread Jon Forsyth
remove the '\'s and '()' the match is printed like so: end('Submit');?> My purpose is to make sure I'm matching the correct lines including the '()', then to alter the code to perform a search and replace on the matches). Something like: perl -p -i.bak -e 's/PATTERN/REPLACE/g' INPUT 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

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

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

Word Frequency Script

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

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

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) = @_; > > > >

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

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: 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/

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

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

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/

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

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

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: 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]> >

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

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

RE: Can't find package AutoLoader in CGI::Application program

2003-12-08 Thread Jon Seidel
Nyimi... Thanks for your reply; I figured it out (there already was a '1' at the end of my module). I had used h2xs to create the module framework... that framework requires exporter and then exports the name 'AutoLoader'. Once I took that out, everything worked fine.

Can't find package AutoLoader in CGI::Application program

2003-12-06 Thread Jon Seidel
I::Application can't find AutoLoader and gives me that error... any pointers would be much appreciated. thanks...jon seidel -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>

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: c shell commands in perl script

2002-10-30 Thread Jon Disnard
"csh";) doesn't work. any suggestions??? thanks u -- -Jon Disnard Computer Associates Unix Systems Administrator Information Systems tele: 2144731000 smtp: [EMAIL PROTECTED] -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

FW: Regex Help - removing HTML tags/script

2002-10-18 Thread Jon Shoberg
I need to remove HTML scripts from some pages. I have to replace <*script*>* with blanks. This includes all javascript/vbscript in between the tags I'm using the * as guidelines to show it must match several variations. Thoughts ? Ideas? Suggestions? Thanks ! Jo

capture out put from piped process

2002-07-15 Thread Jon Howe
How do I capture the output from sendmail running under the -v switch back to my programme. The line I am using is - open (MAIL, "|/usr/lib/sendmail -oi -t -v") or die "cant fork proc to mail\n"; regards Jon -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additio

Re: perl english translator

2002-05-30 Thread Jon Shoberg
clarify ... it must be a progrma that dnot not pull from an online resource like babelfish Thanks Jon - Original Message - From: "Jon Shoberg" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, May 30, 2002 12:31 PM Subject: perl english translator &

perl english translator

2002-05-30 Thread Jon Shoberg
Anyone know of a perl program that can translate english to other languages? Can be a free or pay product. Thanks Jon -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

remove duplicate values from array

2002-04-22 Thread Jon Howe
Can anyone tell me the best method for removing duplicate array values. eg: @array = qw( a a a b b b c); becomes after some operation I cant seem to figure: @new_array_or_same = (a b c);

Re: pack / unpack

2002-04-21 Thread Jon Howe
re:Have you got the hex code for that one? I presume this is the only > character causing difficulty - hence we really want to avoid turning > the whole string into hex numbers - which are harder to process. $values = unpack('H*',"$file"); output for the entit

Re: pack / unpack

2002-04-21 Thread Jon Howe
regexification in that form and the go back to text. Does the solution you surgest still apply? Jon - Original Message - From: "Jonathan E. Paton" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Sunday, April 21, 2002 1:37 PM Subject: Re: pack / unpack > &

pack / unpack

2002-04-21 Thread Jon Howe
I am trying to convert a file into hex from text with a view to doing some manipulation before turning it back to text. #! /usr/bin/perl -w undef $/; open(IN, "< file") || die "no on file"; $file = ; print unpack('H*',"$file"); print "\n\nCONV TO TXT HERE\n\n"; print pack('H*',"$file");

replacing special characters

2002-04-15 Thread jon shoberg
How do I go about removing characters from a string that are not alpha-numeric, a question-mark, < character, or > character ? -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

RE: joining 2 strings

2002-03-22 Thread Jon Riddle
What I am seeing is that you are using the double quote and it should be single quotes -Original Message- From: Matthew Harrison [mailto:[EMAIL PROTECTED]] Sent: Friday, March 22, 2002 3:40 PM To: [EMAIL PROTECTED] Subject: joining 2 strings i need to join $stringa to $stringb with a co

Re: Radio based network prototyping simulator

2002-03-12 Thread Jon Molin
Gary Stainburn wrote: > > Hi Jon, > > On Tuesday 12 March 2002 11:54 am, Jon Molin wrote: > > Gary Stainburn wrote: > > > Hi all, > > > > > > I've got a project where I need to develop an single-board-computer based > > > network devi

Re: Radio based network prototyping simulator

2002-03-12 Thread Jon Molin
; perl > script)? open (F, 'nice -15 tail -f /var/log/messages |'); > > 4) Is there an easy way (or a hard way) within Perl to control the xterm > output, something similar to GotoXY that I used to have in TurboPascal in the > good old (?) DOS days. i've never

Re: Delete words in a string

2002-03-11 Thread Jon Molin
FORIZS Zsolt wrote: > > How do i delete some words in a string, like with SED in Unix. > > please give me some ideas. use a regexp as in sed my $string = "this string sucks"; $string =~ s/sucks/blows/; look at 'perldoc perlre' /jon > > cu zsolt &g

Re: Writing to beginning of file

2002-03-10 Thread Jon Molin
new file, print what you want to have first, append the old file and rename it to the old filename. Or you can use the build in functios for it (look at -i flag in 'perldoc perlrun'). /jon > I tried seeking to the beginning before the write, but it doesn't work. > S

Re: over-writing a file

2002-03-08 Thread Jon Molin
27;s/find/replace/gi;' original.txt note that you'll lose the file if you do a mistake, perl -pibak -e 's/find/replace/gi;' original.txt will create a backup file look at 'perldoc perlrun' /jon > It works, but as I say, I am sure, this is not the best way to

Re: Perl DBI for Sybase [OT]

2002-03-07 Thread Jon Molin
next user. On the other hand, as you say the process will eat memory...so does anyone has THE ANSWER(TM)? /Jon > Stop worrying and fetch the data row after row :-) > > Jenda > > === [EMAIL PROTECTED] == http://Jenda.Krynicky.cz == > There is a reason for li

Re: autorun

2002-03-07 Thread Jon Molin
u wrote: > > > How can I scheduler a cgi script? > > > > Depends on the platform you are working on. Window$ has its TaskPlaner, > *nix > > has a cron daemon (man cron) then cron is what you want (man cron) /Jon > > > > Another way: let the script sleep

Re: Good God. I'm going to pull my hair out.

2002-03-06 Thread Jon Molin
row_arrayref) > { > print @$rec,"\n"; > print "|$rec->[4]|\n"; > push @recs, $rec; > } > > $st->finish; > print " Ref: $recs->[0][4]\n"; have you tried $recs[0]->[4] ? /jon > > -- &g

Re: STDOUT

2002-03-06 Thread Jon Molin
127.0.0.1 -p some_port 2> std_err if not, it prints to stderr and it's stderr you need to redirect STDERR to the file. or you can do: system("/usr/local/netsaint/libexec/check_http 127.0.0.1 -p $port 2>&1"); /Jon > I'm tryied only with on print, and wi

Re: Vexing regex question--storing multiple hits for later use

2002-03-06 Thread Jon Molin
is this what you're after: $str = "This is a very long string, isn't it?" foreach ($str =~ /(i[is])/g) { do stuff } or collect them all: $str = "This is a very long string, isn't it?" my @store = ($str =~ /(i[is])/g); I'm not sure this is what you

Re: moving data from text file to db

2002-03-06 Thread Jon Molin
en the data, and move it > to the table in PostgreSQL. Has anyone come across an article that looks at > this topic specifically? > something like this maybe: open (DATAFILE, 'somefile'); while () { my @values = split /: /, $_; my $sql = "insert into $values[0] ..

Re: read data from post or get ...

2002-03-06 Thread Jon Molin
The data is in the %ENV hash, the key is QUERY_STRING but it only works with GET and can give you some problem with GET as well. What I'd recomend is some reading about the CGI module, either the 'perldoc CGI', online info or the chapter about cgi in learning perl. /Jon fars

Re: Problems with regex only matching first match on a line.

2002-03-05 Thread Jon Molin
t; The problem is that it is only replacing the first match on each line. > Is there a way to do this with regex? > I think I could do something like: while($_ =~ /$pattern/i) {replace the > lines}. But, I was wondering if this could be handled within my if-else > structure? wha

Re: Can I do this with perl?

2002-03-04 Thread Jon Molin
about split, arrays and hashes and i bet you'll solve it in an hour. perldoc -f splir perlfunc perldoc perldata /jon > > Dave -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Running a command Remotely on another Host

2002-03-04 Thread Jon Molin
gt; Appreciate any response from the gurus out there. Lotsa thanx in advance. I don't know windows really but the way i'd do it in *nix would be by ssh, and there are ssh servers for windows too, aren't there? You could either use the ssh module or just use ssh from shell

Re: some questions about for, foreach

2002-03-04 Thread Jon Molin
"John W. Krahn" wrote: > > Jon Molin wrote: > > > > Jan Gruber wrote: > > > > > > Hi, Jon && list ! > > > On Friday 01 March 2002 11:29 am, you wrote: > > > > Hi list! > > > > > > > > I've a

Re: some questions about for, foreach

2002-03-01 Thread Jon Molin
Jan Gruber wrote: > > Hi, Jon && list ! > On Friday 01 March 2002 11:29 am, you wrote: > > Hi list! > > > > I've always thought there's a difference between for and foreach, that > > for uses copies and foreach not. But there's no diff is t

some questions about for, foreach

2002-03-01 Thread Jon Molin
, 4 , 5); foreach (my $i = 0; $i <= $#a;$i++) { print $a[$i], ' '; } print "\n"; 1 2 3 4 5 so, is foreach only an alias for for or is there some diff? /Jon -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Crypt::RSA / Math::Pari problem [SOLVED]

2002-02-28 Thread Jon Molin
Jon Molin wrote: > > Hi list, > > I've been trying to install Crypt::RSA for a couple of hours now and > I've run out of ideas. > > perl Makefile.PL and make runs smoothly but make test shows this: > > PARI: *** precision loss in truncation at >

Crypt::RSA / Math::Pari problem

2002-02-28 Thread Jon Molin
fields...NOK 26 Anyone that's run into this? What happends when you try to install Crypt:RSA? /Jon -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

reading a file line by line

2002-02-27 Thread Jon Serra
for the little bit I actually want, and second, I do not want to make a system call to the unix cat command. TIA Jon -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Matching

2002-02-27 Thread Jon Molin
rldoc perlre') otherwise, if you have the data in an array: my @content = ; close (FILE); for (my $i = 0; $i <= $#content; $i++) { if ($i < $#content && $content[$i] =~ /^Variable1 && $content[$i + 1] =~ /^Variable2/) { do stuff } } /jon > Thanks very

Re: html insert

2002-02-27 Thread Jon Molin
l module for things like that. get the html and merge it. otherwise i'd go for a frame the cgi list is here: http://lists.cpan.org/showlist.cgi?name=beginners-cgi /jon > "Jon Molin" <[EMAIL PROTECTED]> wrote in message > [EMAIL PROTECTED]">news:[EMAIL PROTECTED

Re: html insert

2002-02-27 Thread Jon Molin
71 73 70 56 57 97 1 0 1 0 128 255 0 192 192 192 0 0 0 33 249 4 1 0 0 0 0 44 0 0 0 0 1 0 1 0 0 2 2 68 1 0 59'); my $pxl; my $token; foreach $token (@token_set) { $pxl .= pack ('C', $token); } print $pxl; # end this is a transparent 1 pxl image /jon > > than

Re: Fw: off topic : frames html question

2002-02-26 Thread Jon Molin
Rahul Garg wrote: > > Well, I also dont know whether its possible or not ? > Any suggestions. > I hope you won't keep replying to your own question every second hour, saying that you don't know the answer /jon > - Original Message -- To unsubscribe,

Re: file size

2002-02-22 Thread Jon Molin
anthony wrote: > > Hi, > > I have an upload script, and i want to check the file size before it > uploads. > > Any suggestion is appreciated > > Anthony > here's some old code that does that, might be something built-in in CGI.pm as well: my $tempFile = CGI::tmpFileName($img_filename);

Re: convert array to integer

2002-02-22 Thread Jon Molin
quot;; $some_val =~ s/[^\d]//g; a third is my @array = (5, 6, 7, 8); my $some_val = 0; my $i = 1; for (reverse @array) { $some_val += $i * $_; $i *= 10; } a fourth, is problay both better, quicker, more efficent and shorter but i leave that to someone else :) /Jon > change to i

Re: Perl subroutines using array & hash????

2002-02-21 Thread Jon Molin
is this homework? Your other posts looks very homeworkish... /jon Bruce Ambraal wrote: > > Hi > > How do you do it > Give me two different methods in subroutines, that will: > match together all of its parameters into on large list. > > Many thanks to the following

Re: printing "\n" automagically?

2002-02-15 Thread Jon Molin
> [root@iodine root]# > it's perldoc perlvar (without s) look at perldoc perl and you'll see all the sections /Jon > ???, > Dennis > > >}On Feb 15, 9:33, Nikola Janceski wrote: > >} Subject: RE: printing "\n" automagically? >

Re: Modifers to the table function of CGI

2002-02-14 Thread Jon Molin
The first couple of hits seems relevant, look there. http://www.google.com/search?hl=en&q=CGI.pm also, in the future send cgi questions to the cgi list /jon James Kelty wrote: > > Hello, > > I have read the CGI.pm documentation that comes with the distibution, but I

Re: Generating for loop paterns HELP!

2002-02-14 Thread Jon Molin
This smells homework! /jon Bruce Ambraal wrote: > > Hi > > I have done (b) for coding see below, could someone assist with > (a) (b) (d) > > #!/usr/local/bin/perl -w > my $num_rows; > my $i; > my $r; > > $num_rows = ; > > for ($r = 1; $r <=

Re: stuck again downloading file

2002-02-14 Thread Jon Molin
Try removing all cookies you have in your browser and set it to ask for allowing cookies, then you'll really see if there are any cookies /Jon Tanton Gibbs wrote: > > Ok, I'm having a problem downloading a .zip file from a webpage. If I type > in the filename in the browse

Re: regex question

2002-02-14 Thread Jon Molin
sorry about that answer, too early in the morning to answer questions...i even thought it was the newest. I wish I could go back to sleep /jon -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: regex question

2002-02-14 Thread Jon Molin
I want to strip out is stuff like: > > client=23894749& to strip out stuff like that just do $content =~ s/client=23894749&//g; experiment a bit with it (and read some about it) and you'll learn the basics in notime. Expecially if you allready know how to use modules. /Jon &g

array references

2002-02-13 Thread Jon Serra
Greetings, I have an array, each element will contain a reference to another array. How can I dynamically generate each of those references such that each reference is unique. I am trying to create dynamic 2d arrays. TIA JON -- To unsubscribe, e-mail: [EMAIL PROTECTED] For

Re: sort file

2002-02-13 Thread Jon Molin
Susan Aurand wrote: > > What is the fastest or best way to sort a file alphabetically, the > rewrite it to a file. > you'll print this very fast anyway :) sort file > temp_file;mv temp_file file /Jon > Thanks > Susan > Haywood County Schools > >

Re: finding max value

2002-02-13 Thread Jon Molin
gt; ---end quoted text--- > > or: > $max= (sort @values)[-1]; That doesn't seems like a good sollution, @a = (-1, -5, -3); $max= (sort @a)[-1]; gives -5 as max, it is max min but not max :) > > Personally, I'd prefer Japhy's method for efficiency. same here, i

Re: Form reports

2002-02-12 Thread Jon Molin
should read it. There's some about both files, regular expressions and CGI, all you need. If you for some reason not want to buy the book ther's alot of online docs. Look at www.cpan.org, www.perl.org. You can also read the documentation that comes with CGI.pm by doing 'perldoc CGI'

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.

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: 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: 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: 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: [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: 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: 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

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

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

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]

  1   2   >