Re: Order of operations!

2001-10-30 Thread Rob
l -9 $pid"; > > system($run); > > > It totally skips a.out. What it is meant to do is run a.out and then close > the telnet session using the kill. Locally it works fine(ie. not telneting). > When telneting it just kills without running a.out. > All help apprec

Re: open read write

2001-11-28 Thread Rob
outNum) = $serviceNum + 10; print NUM "$outNum"; close(NUM); Rob Good judgement comes from experience, and experience - well, that comes from poor judgement. On Wed, 28 Nov 2001, Nafiseh Saberi wrote: > hi all. > how r u ? > I wish all of you be fine and happy. > >

Use of uninitialized value

2001-12-17 Thread Rob
t >= 0) { print "\t\t\t$fileName - $phoneNum\n"; } } -- Rob Good judgement comes from experience, and experience - well, that comes from poor judgement. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Use of uninitialized value

2001-12-17 Thread Rob
Thanks; I noticed you removed the () associated with the my portion, is there a good rule to follow as to when the () are necessary? Thanks again(your one of the guys whos post i always read ;^) On Mon, 17 Dec 2001, Curtis Poe wrote: > > --- Rob <[EMAIL PROTECTED]> wrote:

bot trouble

2009-03-28 Thread rob
hi i am trying to write a bot that passes messages to OSC from and IRC i'm having a bit of problem formating my output the messages i get in my OSC client look like this: /irc/11811/$VAR1 = rob;/$VAR1 = testing 1 2 3 when i would like them to look like this: /irc/11811/rob/testing 1 2 3

flattening @AoA

2009-02-23 Thread rob
. each line being one of the permutations of @phrasegroup. any clues? many thanks rob my @phraseA = ("%1\$s'16-> ", "%2\$s16-> ", "%3\$s16-> "); my @phraseB = ("%4\$s'''16-. ", "%5\$s16-. ", "%6\$s16-. " )

Re: flattening @AoA

2009-02-24 Thread rob
egroup); #flatten the array (or maybe its here that i need the "\n" ?) my @flatphraseperm = map {...@$_, " "} @phraseperm; print @flatphraseperm; #i would like this file to have a line break between each permutation of @phrasegroup open PERMOUT, ">$0.perm"; print PERMOUT @flatphraseperm; i hope i made at least a little more sense that time :) thanks rob -- r...@goto10.org rob.goto10.org -- signature.asc Description: Digital signature

self centering random walk within defined range

2009-02-28 Thread rob
hover around 0 up and down a bit in each direction - but it very quickly shoots of into big numbers. i would like to have a way to contain the output range to between -45 and 45 for example. anyone have a clue how to do this? thanks rob #!/usr/bin/perl use strict; use warnings; my @intervalset

Re: self centering random walk within defined range

2009-02-28 Thread rob
Rob Dixon said : > r...@goto10.org wrote: > > hi, > > > > i am finding something couter intuative about randomness and search for a > > solution. > > > > i have a bit of code that randomly selects a number from an array and then > > adds > &

Re: Uninitialized value in concatenation

2011-06-08 Thread Rob
names. You may be running an old perl. Please check your version with perl -v and, in the mean time, fix your program by changing the print statement to print $mynames[$_-1], "\n"; HTH, Rob -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/

Re: Word Frequency Script

2011-06-08 Thread Rob
te use Data::Dumper; print Dumper \%word_count; and you will see the hash that you have built. Cheers, Rob -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/

Re: how to clear the cache inside the module use Math::Combinatorics;

2011-06-08 Thread Rob
a module data December 2006). Math::Combinatorics is also very poorly implemented, and your solution should be to use Algorithm::Combinatorics instead. The only change is to your 'use' statement and to the get_numbers subroutine, which should read as below. (There are other issues with

Files and Arrays - Search for values and write to the right

2011-09-16 Thread Rob
I have a file of test results it is formatted as follows: School |fname| lname | sub| testnum|score| grade|level MLK School | John | Smith | RE | Test 1| 95| A | Prof MLK School | John | Smith | RE | Test 2| 97| A | Prof MLK School | John | Smith | RE | Test 3| 93| A | Prof MLK School | Jo

Re: Very Basic Help

2002-02-14 Thread Rob
One thing that I noticed is your shebang line. You have: #!usr/bin/perl I suspect you want: #!/usr/bin/perl -wT Rob Good judgement comes from experience, and experience - well, that comes from poor judgement. On Thu, 14 Feb 2002, Andrew Hughes wrote: > Why do I keep getting a premature

Execute .bat file from perl?

2002-04-10 Thread Rob
New to this - need to execute a .bat file from a perl script. Any suggestions? -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Execute .exe or .bat files from perl??

2002-04-10 Thread Rob
Anyone know how to call a .exe or .bat file from a perl script? -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

How to use variable in SQL statement (ODBC link to Access)

2002-04-17 Thread Rob
I am trying to insert data into a MS Access database using SQL statements in my perl code. I have gotten the SQL to execute correctly, but only with static data. Does anyone know how I can use variables in the SQL statement and have it still execute correctly? Thanks, Rob -- To

Re: How to use variable in SQL statement (ODBC link to Access)

2002-04-17 Thread Rob
Never Mind... I figured it out "Rob" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > I am trying to insert data into a MS Access database using SQL statements in > my perl code. I have gotten the SQL to execute correctly, but

Pass variables from parent to child script

2002-04-30 Thread Rob
When executing a child script from a parent script using the system command, is there a way to allow the child script to recognize the variables declared by the parent script? In other words, can you replicate the export functionality of a UNIX shell script using PERL? Thanks -- To unsubscri

Pattern Matching

2003-11-19 Thread Rob
Hi, I'm trying to find out how many newline characters are in a string. I thought there would be a simple function for this, but I can't find it; Do I need to step through the string a character at a time to check this? -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail

Re: Pattern Matching

2003-11-19 Thread Rob
This is what I finally came up with, but it too seems rather clunky. my $cnt = 0; $_ = $notes; $cnt = tr/\n//; -- Rob On Wed, 19 Nov 2003, Rob wrote: > Hi, I'm trying to find out how many newline characters are in a string. I > thought there would be a simple function for this,

simple date compare need to do now(); on Date:Calc

2002-12-05 Thread rob
iff\n" ; ### however $year2, $month2, $day2 variables need to be the current date. I cant make heads or tails of the doc page http://www.engelschall.com/~sb/download/Date-Calc/ this must be too obivious of a question... please bear with me your help is appreciated thanks rob -- Ci

Re: simple date compare need to do now(); on Date:Calc

2002-12-05 Thread rob
[EMAIL PROTECTED] wrote: On Thu, 05 Dec 2002 09:53:14 -0600, rob <[EMAIL PROTECTED]> wrote: Hello All Ive been away from this list for a while and am very rusty... I need to know how to pass now(); or today(); to my date compare

sorting hash numerically

2003-02-04 Thread Rob
Hi, I want to sort a hash based on the employee number; I used a foreach loop but it sorts the hash based on the ascii value. How would I get it to sort on integer values? foreach $empNo (sort (keys(%empName))) { print "$empNo $empName{$empNo}\n"; } -- Rob -- To unsubscri

Re: Barcodes

2003-02-04 Thread Rob
must be on the machine displaying the script. #!/usr/bin/perl -wT #barcode.cgi use CGI qw(param); use strict; my($query) = new CGI; my($code) = param("code"); print "Content-type:text/html\n\n"; print < Tracking System *$code* EndHTML ; -- Rob On Tue, 4 Feb 2

using Spreadsheet-WriteExcel-0.37 - Dr. Watson error

2003-02-12 Thread Rob
When I close a spreadsheet written by the Spreadsheet-WriteExcel-0.37 module, I get a Dr. Watson error (NT 4.0). Has anyone else had this issue? -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Module listing

2003-03-05 Thread Rob
Is there a perl command to list installed modules? -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Writing to an existing MS Excel file

2002-06-12 Thread Rob
Does anyone have any advice on how to write to an EXISTING MS Excel file? The goal is to have a script update values in an excel file. Thanks, Rob -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

How to read formulas from an Excel file

2002-06-12 Thread Rob
::WriteExcel. However, in the interest of preserving formulas from the original file, I need to read and write formulas. Is this possible? Thanks for your help. -Rob Hunt -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Status of db insert?

2002-08-15 Thread Rob
but I don't know how. Could someone help me out? Here's the script I'm using for the insert... #!/usr/bin/perl -w use DBI; my $database_name = "paging"; my $database= "dbi:Pg:dbname=$database_name"; my $db_user = "rob"; my $DATA_TB

Slow Postgres Update

2002-08-27 Thread Rob
strict; use DBI; my($sql, @row, $message, $pin, $pageCnt) = ""; my $database = "dbi:Pg:dbname=paging"; my $db_user = "rob"; my $dbh = DBI->connect($database, $db_user, "", {AutoCommit => 1}, ) or die "Can't connect to databas

hours minutes and seconds in seconds

2002-09-06 Thread Rob
nTime = $sessionTime - ($hr * 3600); my $minute = $sessionTime / 60; my $min = int($minute); my $sec = $sessionTime - ($min * 60); print "$hr hour $min minutes and $sec seconds.\n" Rob Good judgement comes from experience, and experience - well, that comes from poor judgement. -- To unsu

Re: issue with chomp - chop need to trim()

2002-09-09 Thread rob
It looks like Ill do something like this in the future from perldoc -q strip blank space # trim whitespace in the scalar, the array, # and all the values in the hash foreach ($scalar, @array, @hash{keys %hash}) { s/^\s+//;

Re: perl and Oracle

2002-09-11 Thread rob
Angelo Marcos Rigo wrote: > Hi! > > I have a oracle database in a windows 2000 machine > and other machine with linux/apache webserver, > > i want to acess that oracle/windows machine from this linux webserver > let my users authenthicate and then see their

Large files

2002-09-11 Thread Rob
can be in Perl? If so, how can I get around it? Rob Good judgement comes from experience, and experience - well, that comes from poor judgement. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Large files

2002-09-11 Thread Rob
If I take 111 lines off from the top of the file it does make it through that line and finishes without a problem. Rob Good judgement comes from experience, and experience - well, that comes from poor judgement. On Wed, 11 Sep 2002, Frank Wiles wrote: > .--[ Rob wrote (2002/09/11 at

Missing (defined($exe) mail prog on WINNT

2002-09-20 Thread rob
l>perl -MMAIL -le "print(MAIL->VERSION)" Can't locate MAIL.pm in @INC (@INC contains: F:/Perl/lib F:/Perl/site/lib .). BEGIN failed--compilation aborted. I do have F:\Perl\site\lib\Mail\Mailer>dir /b > dir.txt which produces mail.pm qmail.pm rfc822.pm sendmail.pm sm

Re: Missing (defined($exe) mail prog on WINNT

2002-09-20 Thread rob
h = $msg->open('mail'); C:\1myperl>amail.pl No mailer type specified (and no default available), thus can not find executable program. at F:/Perl/site/lib/ Mail/Send.pm line 52 It looks like my "executable" mail types are in F:\Perl\site\lib\Mail\Mailer> r> mail.pm

Re: ActivePerl: Any Alternatives to MS-DOS Prompt?

2002-09-21 Thread rob
what your asking executes code in a window other than the dos prompt rob -- "Do not meddle in the affairs of wizards, for you are crunchy and good with ketchup." -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: ActivePerl: Any Alternatives to MS-DOS Prompt?

2002-09-21 Thread rob
properties and modify the output. Basically you can have it look/scroll any way you'd like also wilst in the command window let us not forget to type perldoc perldoc or for a kinder gentler easier to view/print the infamous documentation. http://www.perldoc.com/perl5.8.0/pod.html ro

Re: ActivePerl: Any Alternatives to MS-DOS Prompt?

2002-09-21 Thread rob
; scroll or properties and modify the output. Basically you can have it look/scroll any way you'd like also wilst in the command window let us not forget to type perldoc perldoc or for a kinder, gentler, easier to view/print the infamous documentation. http://www.perldoc.com/perl5.8.0/pod.h

Re: Where can I get lots of modules?

2002-09-25 Thread rob
novice to actual "water walker" or better yet perldoc ppm & perldoc cpan ahhh... that puts me in graces with the perl gods for at least a week ;-) rob -- Of course, I reserve the right to make wholly stupid changes to Perl if I think they improve the language. :-)

Postgres Select

2002-09-27 Thread Rob
each time. But from what I've seen with Postgres so far I would bet that I could do the same thing with a select statement. Would this be possible? Would I need to use a join for something like this? Any help appreciated; Rob Good judgement comes from experience, and experience - well,

Re: Program Stability Issue

2002-10-12 Thread rob
ble you are checking for a time, and when 00: is encountered it throws it out of the loop? just a guess rob -- It's easy to fall into the habit of choosing rigor over vigor. [...] We already have lots of computer languages with rigor, but not so many with vigor. -- La

Re: file to file copy

2002-10-15 Thread Rob
I'm doing anything obscure here that needs explaining. Tell me if I'm wrong. HTH. Cheers, Rob - Original Message - From: "folschette" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, October 15, 2002 10:56 AM Subject: file to file copy >

Re: creating a string on the fly

2002-10-15 Thread Rob
OYEE => ['ID', 'COL1', 'COL2'] Tell me if I'm right. Cheers, Rob - Original Message - From: "Vincent Lee" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, October 15, 2002 12:55 AM Subject: creating a string on t

Re: MLDBM adding records

2002-10-15 Thread Rob
url => "www.slashdot.org" , title => "News for nerds" , lastvisit =>" 10" }; push @array, { url => "www.slashdot.org" , title => "News for nerds" , lastvisit =>" 10"

Re: line count

2002-10-15 Thread Rob
Christophe Jenda's quite right - you have to count them. The reason being that the number of lines in a file is essentially the number of line terminator characters in it. You can't count these without reading the whole file in some way. HTH Rob - Original Message - From: &

Re: line count

2002-10-15 Thread Rob
n/ while sysread(FILE, $_, 2 ** 16); #assumes line > terminator is "\n" > > > -Original Message- > > From: Rob [mailto:[EMAIL PROTECTED]] > > Sent: Tuesday, October 15, 2002 10:12 AM > > To: [EMAIL PROTECTED] > > Cc: [EMAIL PROTECTED] > &g

Re: creating a string on the fly

2002-10-15 Thread Rob
any more about what these might do without knowing more about what interface you have with the database. HTH Rob - Original Message - From: "Vincent Lee" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Tuesday, October 15, 2002 3:37

Re: counter for hash

2002-10-15 Thread Rob
Chad Your program is throwing the error only because you have warnings enabled. The solution is: $hits{$hour} += 1; But I'd be interested to know why you had to use '+ 1'? Also, I think my $hour = ( split /:/, $line )[1]; is nicer. HTH Rob - Original Mess

Re: creating a string on the fly

2002-10-15 Thread Rob
e) which, say, started with an underscore. We would want to put next if $column =~ /^_/; at the start of the loop - a loop which wouldn't exist if we'd used 'join'. Cheers, Rob - Original Message - From: "Jeff 'japhy' Pinyan" <[EMAIL P

Re: creating a string on the fly

2002-10-15 Thread Rob
Or, of course: $, = ", "; print GetColumns ($table); R - Original Message - From: "Jeff 'japhy' Pinyan" <[EMAIL PROTECTED]> To: "Rob" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Tuesday

Re: creating a string on the fly

2002-10-16 Thread Rob
Sorry Vincent I'm not sure what you're meaning. You've written GetColumns ($table). Does it return an array of column names as it should? - Original Message - From: "Vincent Lee" <[EMAIL PROTECTED]> To: "Rob" <[EMAIL PROTECTED]> Cc: <[EM

Re: file to file copy

2002-10-16 Thread Rob
t some problems using your script: > > best is if i give you the three files so here they are > file1 should be merged in file2 but file2 should have the same layout as > befor merging > > christophe folschette > > > Rob wrote: > > > Christophe > > > >

Re: creating a string on the fly

2002-10-18 Thread Rob
e sure. I'd suggest binding a few more significant columns and printing them in the fetch() loop so you can see what's going on. HTH Rob - Original Message - From: "Vincent Lee" <[EMAIL PROTECTED]> To: "Rob" <[EMAIL PROTECTED]> Cc: <[EMAIL PR

Re: Join problem

2002-10-18 Thread Rob
As per my previous post, init your array with @columns = () instead of @columns = "" Cheers, Rob - Original Message - From: "Vincent Lee" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, October 17, 2002 12:47 PM Subject: Join prob

Re: Regular Expression

2001-06-06 Thread rob chanter
s next if /^\s*$/; #skip blank lines > my ($key, $value) = /(\S+)\s*=\s*(.*)/; # extract key/value > chop $value if $value =~ /^['"]/; # remove quotes if they're there > $CONFIG{$key} = $value; > } > cheers rob c

Re: Sorting a hash by value, and displaying the key

2001-06-07 Thread rob chanter
On Sat, Jun 02, 2001 at 06:13:04PM +1000, iain truskett wrote: > Rob talked about > > foreach $value(sort {$a <=> $b} (values(%hash)) { > print $value; > } > > vs. > > foreach $value(sort byNum (values(%hash)) { > print $value; > } > >

Re: Problem with getting a file to open

2001-06-07 Thread rob chanter
lready suggested. If you want to read and then append, I think you would probably have to read it in, close the filehandle, and then reopen for append. Someone will correct me if I'm wrong. cheers rob c

Re: multilingual capabilities of perl

2001-06-07 Thread rob chanter
e that would be easier than rolling your own. cheers rob c

[META] Rants (was:Re: space)

2001-06-08 Thread rob chanter
the list owners will pick up from here, or do we forward FAQ requests to a separate address? Sorry folks, I know we don't need a meta-thread every three days on list etiquette. I'll stick to Perl from now on. cheers rob c donning the asbestos undies

Re: Perl Templates?!

2001-06-08 Thread rob chanter
them from there. But anyway, this one has pretty much all the stuff I want a serious script to contain (-w and strict, command-line options, debugging framework, config file parsing). You could do more, like adding signal handlers, tidying things up by using File::Basename, and so on. cheers rob c

Re: [META] Rants (was:Re: space)

2001-06-11 Thread rob chanter
than programming, or even than finding, subscribing to and understanding the mechanics of mailing lists. The general tone here is pretty friendly when it comes to the actual Perl questions, and we've had a few ... er ... friendly tips being exchanged about how people can use their mail software better. Ah well, back to Perl. rgds rob c

Re: readline fails on Sun machines?

2001-06-11 Thread rob chanter
; or while (defined($account = )) ought to be just fine. I don't know of any situations where you'd prefer readline to <>, and the latter is certainly more idiomatic. cheers rob c

Re: combine STDERR and STDOUT

2001-06-13 Thread rob chanter
lowing would work or not. open PROGRAM_B, "program_B 2>&1 |"; I'm sure others will have more elegant solutions. chrs rob c

Re: file tests

2001-06-20 Thread rob chanter
gic's heuristics aren't bulletproof. They're still probably better than what you could come up with by hand. . A quick search for 'magic' on CPAN throws up File::MMagic, but I have no idea how good it is. cheers rob c

Re: removing white spaces

2001-07-16 Thread Rob Hanz
$string =~ s/\s+//g; matches one or more spaces (\s+), replaces them with nothing (//), repeats until the string ends (g). Rob - Original Message - From: softhome <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, July 16, 2001 8:35 PM Subject: removing white spaces

Re: perl on NT

2001-07-26 Thread Rob Hanz
of mod-perl for IIS. This will require that you name your files with .plx, however. I believe you can set up other mappings if you wish. Rob - Original Message - From: Khan, Masuma <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, July 26, 2001 11:24 AM Subject

Reusing $1?

2001-08-23 Thread Rob Waggoner
# this is more elegant? Turn 19/Aug/2001:06:28:45 -0600 into 19/Aug/2001 $ThisDateTime =~ / (^.*?:) /; # is this pattern bad? $ThisDate = $1; # or does $1 need to be 'reset'? ... Thanks! Rob Waggoner Master Applications Craftsman WAGGS Web based

Re: Reusing $1?

2001-08-23 Thread Rob Waggoner
Thank-you. I don't recall that Camel mentioning the white-space subtlety, but I also haven't hit chapter 5 yet. /(.*?):/ gives me what I needed. At 09:17 PM 08/23/01, you wrote: >On Aug 23, Rob Waggoner said: > > >while ($line = ) { > > $line =~ /\[(.+)\

Perl Style?

2001-08-27 Thread Rob Waggoner
should do is revisit this: http://www.waggs.net/perl/CountCodeRed.txt (which produces this: http://www.waggs.net/perl/coderedcount.xml which ultimately will be used to produce a visual like this: http://www.waggs.net/VMLSamp1.htm) in a couple of moths to see how much more elegant I can make it.

RE: Use of uninitialized value in concatenation (.) or string at mlknpvs.pm line 241

2001-09-04 Thread Rob Dixon
. May we see a little more of your code? Don't forget that, if $name doesn't contain any '.'s then $parts[1] _will_ be uninitialized. Cheers, Rob > -Original Message- > From: John Way [mailto:[EMAIL PROTECTED]] > Sent: 04 September 2001 17:08 > T

RE: How to find the size of a JPEG

2001-09-04 Thread Rob Dixon
In a similar way, a GIF file has either 'GIF87a' or 'GIF89a' the first six bytes (depending whether it's the 1987 or the 1989 standard) followed by the screen width (in pixels) in the next two bytes, followed by the screen height in the two after that. Cheers, Rob

RE: regex: can't match pattern... dang

2001-09-04 Thread Rob Dixon
Which works with or without leading or trailing spaces. It also tidies up the regex and doesn't hand you a user name padded to 7 characters with spaces (which yours would, if it worked). HTH, Rob > -Original Message- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] >

RE: Doing some text parsing

2001-09-04 Thread Rob Dixon
print "\n"; } Sorry this is so brief, but I have to leave for home now. If you need me to I'll explain how it works in an hour or so when I get home... :) Cheers, Rob > -Original Message- > From: Christopher Fisk [mailto:[EMAIL PROTECTED]] > Sent: 04

RE: strict pragma and @ISA

2001-09-05 Thread Rob Dixon
ghout. The other way is to pre-delare the global variables in the package, with use vars qw(@ISA); which then lets you use the identifier without a preceding package name. HTH, Rob > -Original Message- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] > Sent: 04 Septem

RE: Parse file

2001-09-05 Thread Rob Dixon
n you showed us?) open FILE, "< file.txt" or die $!; my $data; { local $/; $data = ; } close FILE; $data =~ m/DHCPDISCOVER from\s*(.+?)\s*via eth0/; $data = $1; print "$data\n"; Come back to me if there's a

RE: How to fetch graphic files from a remote server?

2001-09-05 Thread Rob Dixon
It's really easy using the LWP packages. For instance: use LWP::Simple; getstore ('http://www.perl.org/Images/title.gif', 'title.gif'); will fetch you a camel. Cheers, Rob > -Original Message- > From: ss98 [mailto:[EMAIL PROTECTED]] >

RE: Parse file

2001-09-05 Thread Rob Dixon
to 'via eth0' possible preceded by whitespace I should have explained the next line as well. Putting parentheses into a regex makes perl store whatever was matched by the bracketed expression into built-in variables $1, $2, ... You can even nest the brackets: the variables will be

RE: Reg passing arguements

2001-09-06 Thread Rob Dixon
pass the array together with other parameters and be able to process them separately within the subroutine then you need to pass array references. Let us know if you need anything more before we take this leap. Cheers, Rob > -Original Message- > From: Sutapalli, eswara [mailto:[EMAIL P

RE: Reg passing arguements

2001-09-06 Thread Rob Dixon
{ strcat (command, a[i]); } system (command); exit (0); But there may well be a better way. Cheers, Rob > -Original Message- > From: Sutapalli, eswara [mailto:[EMAIL PROTECTED]] > Sent: 06 September 2001 13:23 > To: 'Rob Dixon ' > Subj

RE: Reg passing arguements

2001-09-06 Thread Rob Dixon
Sorry (again) that should be 'char *a[]' R > -Original Message----- > From: Rob Dixon [mailto:[EMAIL PROTECTED]] > Sent: 06 September 2001 13:04 > To: Sutapalli eswara; 'Rob Dixon ' > Cc: Beginners@Perl. Org > Subject: RE: Reg passing arguements

RE: CHOIR

2001-09-06 Thread Rob Dixon
f course, the return from 'cwd') in sync. HTH, Rob > -Original Message- > From: THE SPENCERS [mailto:[EMAIL PROTECTED]] > Sent: 06 September 2001 14:29 > To: [EMAIL PROTECTED] > Subject: RE: CHOIR > > > Hello Team, > > Sorry for the confusi

RE: To send data from perl script to HTML /ASP page.

2001-09-06 Thread Rob Dixon
What is the error Deepak? Don't you mean $url -> query_form( 'dataReceived' => '2000', 'Area' => '24' ); ??? Rob > -Original Message- > From: D.Gupta [mailto:[EMAIL PROTECTED]] > Sent: 06 September 2001 15:33 >

RE: To send data from perl script to HTML /ASP page.

2001-09-06 Thread Rob Dixon
pt will look for the two parameters, find neither of them, and leave data1 and data2 blank. Your response will therefore be empty. HTH, Rob > -Original Message- > From: D.Gupta [mailto:[EMAIL PROTECTED]] > Sent: 06 September 2001 16:09 > To: Rob Dixon > Subject: Re: To send

RE: Printf

2001-09-06 Thread Rob Dixon
e default is to right-justify within the field. HTH, Rob > -Original Message- > From: Govinderjit Dhinsa [mailto:[EMAIL PROTECTED]] > Sent: 06 September 2001 15:38 > To: '[EMAIL PROTECTED]' > Cc: '[EMAIL PROTECTED]' > Subject: Printf > > &

RE: Urgent !!! installing Storable.pm

2001-09-07 Thread Rob Dixon
> ppm install Storable Rob > -Original Message- > From: Rajeev Rumale [mailto:[EMAIL PROTECTED]] > Sent: 17 September 2001 06:10 > To: [EMAIL PROTECTED] > Subject: Urgent !!! installing Storable.pm > > > Hi, > > I need to install and use the Storab

RE: String operation

2001-09-07 Thread Rob Dixon
You may need > > $string =~ /\s+(\S+)\s+/; > if you could have mnore than one whitespace character delimiting the field. Rob > -Original Message- > From: John Edwards [mailto:[EMAIL PROTECTED]] > Sent: 07 September 2001 09:20 > To: 'Thaddeus Robertson

RE: Urgent !!! installing Storable.pm

2001-09-07 Thread Rob Dixon
Rajeev Looks like you're missing a dependency of the Storable module. Try: > set HTTP_proxy=http://proxy.server:port > ppm install Storable We'll get there in the end! Cheers, Rob > -Original Message- > From: Rajeev Rumale [mailto:[EMAIL PROTECTED]] > Sent

RE: &' meanning

2001-09-07 Thread Rob Dixon
Now /that/ I didn't know. (About the ' I mean.) Thanks Paul. > -Original Message- > From: Paul Johnson [mailto:[EMAIL PROTECTED]] > Sent: 07 September 2001 11:44 > To: agc > Cc: perl > Subject: Re: &' meanning > > > On Fri, Sep 07, 2001 at 06:33:23AM -0400, agc wrote: > > what does &ex

RE: Regex s///

2001-09-07 Thread Rob Dixon
xpecting the file itself to be modified? Cheers, Rob > -Original Message- > From: Veeraraju_Mareddi [mailto:[EMAIL PROTECTED]] > Sent: 07 September 2001 10:36 > To: '[EMAIL PROTECTED]' > Cc: '[EMAIL PROTECTED]' > Subject: Regex s/// > > > D

IO::Pipe: how to redirect to STDOUT

2001-05-24 Thread Rob McMillin
If I get an IO::Pipe object, how can I use it to redirect STDOUT? I'm in the process of writing a replacement for the open(FOO,"some_process|") idiom for a subprocess and because I like debugging, I don't want ctrl-C being sent to the child process. I see this as $pipe = IO::Pipe->new(); $pid =

Re: Sorting a hash by value, and displaying the key

2001-05-31 Thread rob chanter
s an anonymous subroutine that specifies a numeric sort. You could also do foreach $value(sort byNum (values(%hash)){ print $value; } sub byNum { $a <=> $b; } "perldoc -f sort" ought to help if you need more info. cheers rob c

Re: how to wait 50 second ?

2001-06-01 Thread rob chanter
whatever the hell he wanted on my system :-). > Thanks in advance > You're welcome. rob c

Re: printf and other stuff

2001-06-05 Thread Rob Hanz
Michael Fowler wrote: > On Tue, Jun 05, 2001 at 08:05:24AM -0400, Herb Hall wrote: > > $min = "0" . $min if $min < 10; > > > > will pad your minutes with a 0. I have used both methods for various > > reasons. You probably only need to use one or the other. I would use the > > printf unless you hav

re:[OT] style

2001-06-05 Thread Hanz, Rob
gs like: print OUTFILE $variable || die "Error writing to $nameofmyoutfile "; Which will die if $variable is ever something that evaluates to boolean false (notably 0 or ""). While this can be avoided with use of parentheses (and an experienced perl coder will probably spot the issue in two seconds), in most circumstances I could argue it's best to avoid the possible confusion. Rob

RE: [OT] style

2001-06-05 Thread Hanz, Rob
#x27;s a good way to avoid gotchas exactly like we've just discussed. When teaching someone a foreign language, you don't start with slang and contractions. I would still recommend, for a beginner, using 'or' in the "do something or die" construct, just because it's less likely, in that particular construct, to do something you don't expect. Rob

RE: printing lines chunk

2001-11-10 Thread Rob Hite
quot;, @comments), "\n"; This will make each row maxium 70 characters, with no leading tab, and each following line 5 spaces. Rob -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Win 98 SE; Apache; Perl; MySQL

2001-11-19 Thread Rob Benjamin
I'm trying to set up my Win98 SE system with Apache & Perl (already loaded) and later MySQL to run as development/test before uploading to my ISP. Is there a quick checklist to use to get Perl scripts to run under Apache this way? Bob Benjamin [EMAIL PROTECTED] So. Pasadena, CA -- To unsubsc

  1   2   3   4   5   6   7   8   9   10   >