RE: problem with command SYSTEM

2001-06-16 Thread Brian
ver has access to anyway. What you might have to do (and I'm not sure here) is something like: If($msgtxt =~ /^[\w\d]+$/ && $dest =~ /^[\w\d]+$/) { system("blah"); } I'm not sure if that will work, but it's something to try. You could also turn on the taint

RE: Regarding Internal Server Error

2001-07-16 Thread Brian
STDOUT; $|=1; select STDERR; $|=1; select $oldfh; print "Content-type: text/html\n\n"; } Basically the above BEGIN scope turns off buffering for standard error and standard out. Forcing it to print any errors to the browser. Ugly, but functional. :o) Brian Johnson Partner/Systems

RE: Problems with ^M

2001-07-16 Thread Brian
eturn. Very pesky under *nix. Solution? Just parse for the \r's and it should solve your problem. I've seen this a lot when using text boxes off a web page that were not set to soft wrap. But, anyway, something like this should work for you: s/\r$//; Brian Johnson Partner/System

RE: Parsing of a File and SEARCH ...........HELP!!!!!!!!!!!!!

2001-07-16 Thread Brian
This should help you, the while will step through each line of the text file, and you can do whatever you want using the magical $_ variable. God I love perl. open(F, ") { do something with $_; } close(F); Brian Johnson Partner/Systems Administrator/Programmer Source1Hosting.tv

RE: PARSING

2001-07-17 Thread Brian
Well, if you don't mind using an array you could just do something like: my @names = split(/\;/, $string); This will put each name into a different element of the names array. So, $names[0] would be rahul, $names[1] would be john, etc... Brian Johnson Partner/Systems Administrator/Progr

RE: Parsing of a File and SEARCH ...........HELP!!!!!!!!!!!!!

2001-07-17 Thread Brian
This should help you, the while will step through each line of the text file, and you can do whatever you want using the magical $_ variable. God I love perl. open(F, ") { do something with $_; } close(F); Brian Johnson Partner/Systems Administrator/Programmer Source1Hosting.tv

RE: How can I avoid browser time outs?

2001-07-17 Thread Brian
for our scripts to get the mail. So, Brian (a different Brian, not me) wrote a small javascript on the page that updated a process bar. Then what he did was print a call to the JavaScript to the browser every few seconds. This gave the client something to look at, and it also let them know how

RE: Redirection of STDERR

2001-07-17 Thread Brian
# More code } Remember, scoping brackets are you friend. :o) Brian Johnson Partner/Systems Administrator/Programmer Source1Hosting.tv, LLC (www.source1hosting.tv) Source1Results.com, LLC (www.source1results.com) I may be insane, but remember - The only difference between an insane man and a genius

RE: Redirection of STDERR

2001-07-17 Thread Brian
> You forgot to localize. =o) > local *STDERR; Thanks for pointing it out, I completely forgot. :o) 'tis bad practice to answer in haste I guess. Hehe. Brian Johnson Partner/Systems Administrator/Programmer Source1Hosting.tv, LLC (www.source1hosting.tv) Source1Resul

RE: how does one redirect both STDERR and STDOUT to $file?

2001-07-17 Thread Brian
t like I said I'm not sure of this. Perhaps one of the experts on the list will be able to shed some light on this topic. Brian Johnson Partner/Systems Administrator/Programmer Source1Hosting.tv, LLC (www.source1hosting.tv) Source1Results.com, LLC (www.source1results.com) I may be insane, but reme

RE: Script won't exec

2001-07-17 Thread Brian
Post some code, somebody will be able to pick up on something perhaps you missed. :o) Can't help without code. Brian Johnson Partner/Systems Administrator/Programmer Source1Hosting.tv, LLC (www.source1hosting.tv) Source1Results.com, LLC (www.source1results.com) I may be insane, but rem

RE: Dreaded Internal Server Error

2001-07-17 Thread Brian
t the error message to the screen so you can further diagnose your problem. :o) If this doesn't work, try posting some code so we can see it. Maybe one of the many gurus will see something that you are missing. Brian Johnson Partner/Systems Administrator/Programmer Source1Hostin

RE: Splitting string using split()

2001-07-17 Thread Brian
This seems like more of a job for regexp than for split. Is there any reason not to use regexp in your particular case? Brian Johnson Partner/Systems Administrator/Programmer Source1Hosting.tv, LLC (www.source1hosting.tv) Source1Results.com, LLC (www.source1results.com) I may be insane, but

RE: Dreaded Internal Server Error

2001-07-17 Thread Brian
or whatever else happens to be there. Brian Johnson Partner/Systems Administrator/Programmer Source1Hosting.tv, LLC (www.source1hosting.tv) Source1Results.com, LLC (www.source1results.com) I may be insane, but remember - The only difference between an insane man and a genius is his jacket. >

RE: Splitting string using split()

2001-07-17 Thread Brian
L PROTECTED]>" This will work as long as all the lines are in the format you gave earlier: $s = '[EMAIL PROTECTED], "Blow, Joe" <[EMAIL PROTECTED]>,Joe Blow <[EMAIL PROTECTED]>'; If not, lemme know and I'll do my best (or somebody else will I'm su

RE: I don't know what to title this question...

2001-07-18 Thread Brian
, only with a different situation. E-mol.com allows you to check your POP3 email from anywhere in the world. Sounded easy enough. But, what if somebody has 75,000 messages? Well, the browser would time out waiting for our scripts to get the mail. So, Brian (a different Brian, not me) wrote a

RE: Date question

2001-07-18 Thread Brian
=DateManip Brian Johnson Partner/Systems Administrator/Programmer Source1Hosting.tv, LLC (www.source1hosting.tv) Source1Results.com, LLC (www.source1results.com) I may be insane, but remember - The only difference between an insane man and a genius is his jacket. > > I know this might b

RE: I'm parsing! But...

2001-07-18 Thread Brian
::SMTP module for help with sending email. And no, this isn't very secure. Any time you send anything over email, it's send plain text and therefore is insecure. Plus I'm guessing you are not using a secure web site, so that as well is being sent plain text. Brian Johnso

RE: What modules should I look to first?

2001-07-18 Thread Brian
I would like to place my vote for these 3: CGI.pm DBI Date::Calc I think I use these 3 more than any others. Brian Johnson Partner/Systems Administrator/Programmer Source1Hosting.tv, LLC (www.source1hosting.tv) Source1Results.com, LLC (www.source1results.com) I may be insane, but remember

RE: regex self taught, not fun...

2001-07-18 Thread Brian
t;. So, this regexp would replace the entire line with "bob, something in here". I would suggest picking up a copy of "Mastering Regular Expressions". It's an awesome book for learning regexps. :o) Brian Johnson Partner/Systems Administrator/Programmer Source1Hosting.tv,

RE: Splitting string using split()

2001-07-18 Thread Brian
want to replace the while loop with something a bit better, or perhaps put something in the while to make sure $s is changing, if not die. I did it with a quick else at the end of the while. Otherwise you'll end up with an infinite loop on your hands if one little thing isn'

RE: Removing spaces

2001-07-18 Thread Brian
This should do it for you: $sring =~ s/^ +| +$//; Brian Johnson Partner/Systems Administrator/Programmer Source1Hosting.tv, LLC (www.source1hosting.tv) Source1Results.com, LLC (www.source1results.com) I may be insane, but remember - The only difference between an insane man and a genius is his

RE: so simple!i am newbie!

2001-07-19 Thread Brian
You should pick up a copy of "Programming Perl". I think it would be of great value to you. It's an awesome book. It talks about a lot of things you have questions about. :o) Brian Johnson Partner/Systems Administrator/Programmer Source1Hosting.tv, LLC (www.so

RE: shared hash - how ?

2001-08-02 Thread Brian
Somebody on the mod_perl mailing list might be able to help you better than somebody on the begginers perl list. This is a bit OT (okay, it's way out in left field. If you go to http://perl.apache.com you can sign up for the list. #!/usr/bin/Brian Johnson $job= "Lazin

Memory usage of var...

2001-09-04 Thread Brian
2am, so I'm sure I'm not thinking clearly. Thanks in advance. Brian Johnson [EMAIL PROTECTED] http://www.source1results.com Providing marketing solutions for Small to Medium sized businesses. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

RE: Memory usage of var...

2001-09-06 Thread Brian
know how naughty they were. I've thought of doing a char count on the fly, but that could get really slow. Any thoughts? Brian Johnson [EMAIL PROTECTED] http://www.source1results.com Providing marketing solutions for Small to Medium sized businesses. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

RE: cgi-lib.pl

2001-09-19 Thread Brian
Cgi-lib.pl is pretty old, and deprecated. You should really look into using CGI.pm. There is great documentation at cpan: http://search.cpan.org/search?dist=CGI.pm Good luck. -Brian Johnson Check your pop3 email online from anywhere! http://e-mol.business-professionals.net Written in Perl by

RE: aanother simple question

2001-09-20 Thread Brian
ys be true. Hope this helps you. NOTE: I didn't really test the above code, so there may be a type-o in there (sometimes my fingers work faster than my brain). -Brian Johnson Check your pop3 email online from anywhere! http://e-mol.business-professionals.net Written in Perl by Perl lovers >

RE: nohup'ing

2001-09-24 Thread Brian
This should do the trick for you: $SIG{HUP} = 'IGNORE'; Or, if you have a config file you would like to re-parse or something, you could create a sub that does this, and then do something like: $SIG{HUP} = \&Parse_Config; Hope it helps. -Brian > Folks, > > What woul

Greetings

2001-10-18 Thread Brian
Does any one have any good resources for processing SQL w/ Perl? Just basic stuff, ie: select * from table_name; type of statements?? Thanks Ya, Brian -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Assistance with Array.

2001-10-22 Thread Brian
as the base element? Thanks a bunch! Brian -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Attention anyone.

2001-10-22 Thread Brian
me { #code } By using the "require" statement, that should link/load the you_need_me.pl file into the main program, kind of like an $INCLUDE in C/C++ ? Thank You! Brian -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

RE: Using Win32::sound module

2002-01-19 Thread Brian
Examples can be found on the CPAN page: http://search.cpan.org/doc/ACALPINI/Win32-Sound-0.45/Sound.pm -Brian > -Original Message- > From: Joe Slaven [mailto:[EMAIL PROTECTED]] > Sent: Saturday, January 19, 2002 4:44 PM > To: [EMAIL PROTECTED] > Subject: Using Win3

if statement being ignored

2009-04-14 Thread Brian
Hi, could someone please help me with this little problem? I am trying to include an if statement part way through printing. When the program reaches the line if ($Lang = fr ) { print " that line gets ignored and the cgi keeps going to the end. thanks Brian #! c:\perl\bin\perl.exe -

Re: AW: if statement being ignored

2009-04-15 Thread Brian
Thomas Bätzler wrote: Brian wrote: could someone please help me with this little problem? I am trying to include an if statement part way through printing. When the program reaches the line if ($Lang = fr ) { print " that line gets ignored and the cgi keeps going to the end. thanks

help needed to get over endless loop

2009-04-17 Thread Brian
;} if ($mystart > 0 ) {print "line 2..10 with data"} $mystart++ ; $i++; } } thanks Brian -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/

Re: help needed to get over endless loop

2009-04-17 Thread Brian
Wagner, David --- Senior Programmer Analyst --- CFS wrote: -Original Message- From: Brian [mailto:brian5432...@yahoo.co.uk] Sent: Friday, April 17, 2009 11:03 To: Perl Beginners Subject: help needed to get over endless loop Hi I had this semi-working, changed something and can&#

Re: help needed to get over endless loop

2009-04-17 Thread Brian
This is what I'm using upto the code that is giving me a headache. I know it's messy, but I have no training in PERL, I am trying to forward-engineer this cgi by back-engineering from html templates I created and which were chosen using $t->src thanks for any help Brian #

Re: help needed to get over endless loop

2009-04-17 Thread Brian
Brian wrote: oops, should read.. $Year_out = $Year_in; while ($Year_out > 100) {$Year_out -= 100;} if (($Year_out > 00) && ($Year_out <= 25)) {$string = $string1;} if (($Year_out > 25) && ($Year_out <= 50)) {$Year_out -= 25;$

Re: help needed to get over endless loop

2009-04-17 Thread Brian
Kevin Ponds wrote: Brian, Your while loops aren't actually performing any operation on the variable I did actually state that the loops wouldn't work. I adjusted them to better show what I want to achieve, not to show how I am trying to achieve it. that is being tested as par

Re: help needed to get over endless loop

2009-04-17 Thread Brian
Jim Gibson wrote: On 4/17/09 Fri Apr 17, 2009 1:50 PM, "Brian" scribbled: Brian wrote: oops, should read.. $Year_out = $Year_in; while ($Year_out > 100) {$Year_out -= 100;} if (($Year_out > 00) && ($Year_out <= 25)) {$string = $string1

Re: help needed to get over endless loop

2009-04-17 Thread Brian
John W. Krahn wrote: Brian wrote: This is what I'm using upto the code that is giving me a headache. I know it's messy, but I have no training in PERL, I am trying to forward-engineer this cgi by back-engineering from html templates I created and which were chosen using $t->src

Re: help needed to get over endless loop

2009-04-17 Thread Brian
Brian wrote: John W. Krahn wrote: Brian wrote: chomp($Lang = $val1); chomp($Year_in = $val2); chomp() removes the contents of the $/ variable from the end of the string. What makes you think that $val1 and $val2 need to be chomp()ed? Oops, they are leftovers from when I was using STDIN

Re: help needed to get over endless loop

2009-04-17 Thread Brian
John W. Krahn wrote: Brian wrote: This is what I'm using upto the code that is giving me a headache. I know it's messy, but I have no training in PERL, I am trying to forward-engineer this cgi by back-engineering from html templates I created and which were chosen using $t->

Re: help needed to get over endless loop

2009-04-17 Thread Brian
John W. Krahn wrote: Brian wrote: John W. Krahn wrote: Brian wrote: This is what I'm using upto the code that is giving me a headache. I know it's messy, but I have no training in PERL, I am trying to forward-engineer this cgi by back-engineering from html templates I created

Re: help needed to get over endless loop

2009-04-20 Thread Brian
Thank you all for your much needed help. The penny has managed to drop. regards Brian -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/

Would appreciate some help with a bit more counting problems

2009-04-21 Thread Brian
art < 1 Print a red value for $i 1,8,15,22,29,36 Print a black value for other 1..31 Print a non-value for remainder of 42 count. thanks Brian ps I'm switching between using strict and not using it. but, as is, it needs to be off to get anywhere. #! c:\perl\bin\perl.exe -T use warning

Re: Array, foreach problem

2010-05-05 Thread Brian
> > >> >> foreach $line () { > > while (my $line = <$logfile>) would be a better idea than foreach $line. > Just curious for an explanation to this. I tend to use foreach too. Don't they both accomplish the same thing? :) -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org Fo

Re: Inverting a hash

2010-05-09 Thread Brian
> I have an example from Shawn C. from another thread, presented here > out of context. The code does just what he meant it to do. > It inverts a hash. Just curious if there is a particular reason Shawn did not use the reverse function: my %hash = ( './b/fb'=> 'fb',

Re: Inverting a hash

2010-05-09 Thread Brian
I have an example from Shawn C. from another thread, presented here out of context. The code does just what he meant it to do. It inverts a hash. Just curious if there is a particular reason Shawn did not use the reverse function: my %hash = ( './b/fb'=> 'fb', './

regex to add trailing slash if doesn't end in html

2010-05-12 Thread Brian
/", "lc5", ); map {s/(some regex here)/$1\//} @pages; Thanks, Brian -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/

Re: maping a network with perl

2010-05-19 Thread Brian
On May 19, 2010, at 1:19 PM, packet wrote: > How can we map a network in perl? > > i was just thinking how we can do that.Sorry new to perl. > Only way I know how to do it is with the use of Net::SNMP and Net::Ping. Use Net::SNMP to get a list of adjacent networks from routers, and use net::P

Re: Return value = 0

2010-05-26 Thread Brian
On May 26, 2010, at 9:03 AM, Andros Zuna wrote: > Hi, > I did some few changes: > > #! > /usr/bin/perl > > # use > warnings; > # use > strict; > > > $command = `ls > -l`; > Looks like you're using backticks. Backticks actually causes perl to execute the command inside them and return the o

Re: Return value = 0

2010-05-26 Thread Brian
On May 26, 2010, at 9:43 AM, Andros Zuna wrote: > Ok, I see, so the code should look somehow like this: > > #! > /usr/bin/perl > > use > warnings; > use > strict; > > > $command = "ls > -l"; ^^ Strongly suggest you use full paths here. > > while (system($command) != 0) > { >my > $c++ >

Variable issue

2008-10-14 Thread Brian
%date%') do set month=%%m Whilst these lines work perfectly happily on my 2000 system, year is not getting set, and month is being set as 2008 I appreciate that this is not a perl issue, if someone can't help with those lines, maybe someone could help by substituting them with a PERL method. thanks Brian

Conditional replace

2008-10-22 Thread Brian
each $file (@file){ $file =~ s/./g; <--- ?? print IN $file; } close IN; Thanks Brian

Re: Conditional replace

2008-10-22 Thread Brian
From: Rob Coops <[EMAIL PROTECTED]> To: beginners@perl.org Sent: Wednesday, October 22, 2008 3:24:12 PM Subject: Re: Conditional replace On Wed, Oct 22, 2008 at 3:38 PM, Brian <[EMAIL PROTECTED]> wrote: > Hi > > ARGV0 will = AB7Z001 &

Re: Conditional replace

2008-10-22 Thread Brian
John W. Krahn wrote: Brian wrote: Hi Hello, #!/usr/bin/perl use warnings; use strict; @ARGV == 3 or die "usage: $0 \n"; my ( $search, $replace, $date ) = @ARGV; my ( $day, $mon, $year ) = ( localtime )[ 3, 4, 5 ]; my $today = sprintf '%02d/%02d/%04d', $day, $m

Re: Conditional replace

2008-10-22 Thread Brian
Brian wrote: John W. Krahn wrote: Brian wrote: Hi Hello, #!/usr/bin/perl use warnings; use strict; @ARGV == 3 or die "usage: $0 \n"; my ( $search, $replace, $date ) = @ARGV; my ( $day, $mon, $year ) = ( localtime )[ 3, 4, 5 ]; my $today = sprintf '%02d/%02d/%04d&#

Re: Conditional replace

2008-10-22 Thread Brian
Brian wrote: Brian wrote: John W. Krahn wrote: Brian wrote: Hi Hello, #!/usr/bin/perl use warnings; use strict; @ARGV == 3 or die "usage: $0 \n"; my ( $search, $replace, $date ) = @ARGV; my ( $day, $mon, $year ) = ( localtime )[ 3, 4, 5 ]; my $today = sprintf '

Re: Conditional replace

2008-10-23 Thread Brian
John W. Krahn wrote: Brian wrote: Partial success. The value is normally located starting at the 35th char into the line. I split the line so it was at the beginning of a new line and with> worked. Unfortunately the dates never changed. I will sleep on this and attack it again in

Re: Conditional replace

2008-10-24 Thread Brian
Brian wrote: John W. Krahn wrote: Brian wrote: Partial success. The value is normally located starting at the 35th char into the line. I split the line so it was at the beginning of a new line and worked. Unfortunately the dates never changed. I will sleep on this and attack it again in

Output

2008-10-24 Thread Brian
V ) = ( '.bak', '$New_Folder/dummy.html' ); while ( <> ) { s!something!something-else! s!another-thing!another-thing-changed! } print; } Thank you Brian -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Re: Output

2008-10-24 Thread Brian
John W. Krahn wrote: Brian wrote: Hello Hello, Having played around for a while, I am able to get a reasonable result using Example 1, the unreasonable part being that l> gets added to the end of the file, I can only presume here that it is duplicating the last 2 characters of the l

recurse dir & files

2008-10-26 Thread Brian
.85GB (2.57 million files). If possible, full pathnames of the files containing the string to go to dummy.txt I would like to see just how quickly PERL can complete a search, using Windows search facility I killed the incomplete search after leaving it to run for almost a day. thanks Brian PS Fo

Re: recurse dir & files

2008-10-26 Thread Brian
Peter Scott wrote: On Sun, 26 Oct 2008 08:52:09 +, Brian wrote: I would like to do a recursive search of directories and files, checking to see if a file contains a certain string. Type perldoc File::Find Thanks, but it all became chinese after a few lines. Brian -- To

Re: recurse dir & file

2008-10-26 Thread Brian
Jeff Pang wrote: 2008/10/26 Brian <[EMAIL PROTECTED]>: Hello I would like to do a recursive search of directories and files, checking to see if a file contains a certain string. will be a string containing whitespace(s). As soon as I hit enter, I would like dummy.txt to be time stamp

Re: recurse dir & files

2008-10-26 Thread Brian
Dr.Ruud wrote: Brian schreef: Peter Scott: Brian: I would like to do a recursive search of directories and files, checking to see if a file contains a certain string. Type perldoc File::Find Thanks, but it all became chinese after a few lines. Put "LANG=C " before the previo

Re: recurse dir & fil

2008-10-26 Thread Brian
Jeff Pang wrote: 2008/10/26 Brian <[EMAIL PROTECTED]>: Jeff Pang wrote: find /path -type f -exec grep -H "string" {} \; Tried this different ways, all come out with closely the same error messages. With no kbd input, if I change your line to .. find /test -type f -ex

Re: recurse dir & files

2008-10-26 Thread Brian
John W. Krahn wrote: Brian wrote: Hello Hello, I would like to do a recursive search of directories and files, checking to see if a file contains a certain string. will be a string containing whitespace(s). As soon as I hit enter, I would like dummy.txt to be time stamped and again at

Re: recurse dir & files

2008-10-26 Thread Brian
Dr.Ruud wrote: Brian schreef: Dr.Ruud: Brian: Peter Scott: Brian: I would like to do a recursive search of directories and files, checking to see if a file contains a certain string. Type perldoc File::Find Thanks, but it all became chinese after a few lines. Put "LANG=C "

Re: recurse dir & files

2008-10-26 Thread Brian
John W. Krahn wrote: Brian wrote: John W. Krahn wrote: Brian wrote: I would like to do a recursive search of directories and files, checking to see if a file contains a certain string. will be a string containing whitespace(s). As soon as I hit enter, I would like dummy.txt to be time

Re: recurse dir & files

2008-10-26 Thread Brian
Mr. Shawn H. Corey wrote: }, '/test'; }}, '/test'; # One for the while, one for the sub Thank you. Somethings happening, hopefully it won't be too many hours before it terminates. Brian -- To unsubscribe, e-mail: [EMAIL PROTECTED] For ad

Re: recurse dir & files

2008-10-27 Thread Brian
the total CPU time and Mem usage was (I was in bed by then), but upon start Mem was around 20MB, after about an hour CPU was about 9 mins mem 30MB, and after approx 7 hours, CPU time was 1 hour 7 mins and slightly over 95MB mem usage. regards Brian -- To unsubscribe, e-mail: [EMAIL PROTECTED

Replace a specific block of data

2008-10-27 Thread Brian
Hello again Not too sure how to pose this question, but here goes. Working on an html page. There are many blocks of code placed between and in the page. The block(s) I am playing with have seven lines of code placed between and , (repeated a number of times throughout the page) but which

Curly braces and the logic of PERL

2008-10-27 Thread Brian
sub { return unless -f; open my $FH, '<', $_ or die "Cannot open '$_' $!"; while ( <$FH> ) { /\Q$string/ && print $REPORT "$File::Find::name\n" and return; }}, '/test'; Why isn't the last

Re: Curly braces and the logic of PERL

2008-10-27 Thread Brian
John W. Krahn wrote: Brian wrote: Hello Hello, An example of something confusing me is in the sample below find sub { return unless -f; open my $FH, '<', $_ or die "Cannot open '$_' $!"; while ( <$FH> ) { /\Q$string/ &am

Re: Curly braces and the logic of PERL

2008-10-27 Thread Brian
Telemachus wrote: On Mon Oct 27 2008 @ 5:05, Brian wrote: An example of something confusing me is in the sample below find sub { return unless -f; open my $FH, '<', $_ or die "Cannot open '$_' $!"; while ( <$FH> ) { /\Q$string

Re: Curly braces and the logic of PERL

2008-10-27 Thread Brian
Bob McConnell wrote: From: Brian Why is it "good practice" to write PERL the way it is done? Discussing coding styles often degenerates into a religious and/or political argument, but I will try an overview. Don't worry, I'll be gentle. If you care to notice, even t

Re: Curly braces and the logic of PERL

2008-10-27 Thread Brian
Mr. Shawn H. Corey wrote: On Mon, 2008-10-27 at 17:05 +, Brian wrote: Hello This code is written this way because the coder has been playing too much Perl Golf ;) The objective of Perl Golf is to write a program to do a simple task in the least number of characters possible. This

Re: Replace a specific block of data

2008-10-27 Thread Brian
Jay Savage wrote: On Mon, Oct 27, 2008 at 7:32 AM, Brian <[EMAIL PROTECTED]> wrote: Hello again Not too sure how to pose this question, but here goes. Working on an html page. There are many blocks of code placed between and in the page. The block(s) I am playing with have seven li

Re: matching elements from array and print the results line by line from log file

2008-10-30 Thread Brian
slow_leaner wrote: On Oct 28, 2:51 pm, [EMAIL PROTECTED] (Andy Cravens) wrote: -Original Message- From: slow_leaner [mailto:[EMAIL PROTECTED] Sent: Tue 10/28/2008 11:58 AM To: [EMAIL PROTECTED] Subject: matching elements from array and print the results line by line from log file Hi, I

pushing value to $t->src

2008-11-05 Thread Brian
tly appreciated regards Brian #! c:\perl\bin\perl.exe use CGI qw/:all/; use CGI::Carp qw/fatalsToBrowser/; use HTMLTMPL; my $t = HTMLTMPL->new(); $t->src( 'c:/apache2/htdocs/testing/testing123/$ZZ.html' ); my $parent = "c:/apache2/htdocs" . $ENV{ 'REQUEST_U

Re: pushing value to $t->src

2008-11-05 Thread Brian
3/$.html" ); $t->number_in( $number_in ); $t->output( CGI::header ); (I keep putting on my "input/calc/output" hat. Brian -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Re: pushing value to $t->src

2008-11-05 Thread Brian
After quite a bit of poking around in the script, I actually got it to work, well 99.9% anyway. $t->number_in( $number_in ); Going by some other pages I have, I understood the above line to mean that ->number_in will be replaced by the value in $number_in. However, when the page hits the brows

getting data from URL

2008-11-11 Thread Brian
owser, especially that ugly superfluous submit=submit. thanks Brian -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

File manipulation

2008-11-27 Thread Brian
3979A6ECB.txt If there are instances of "fred_bloggs_was_here_" in say, \a\a\ and \a\b\, then all instances in \a\b\ to be moved up to \a\a\. I can see it getting even harder here, as I would also like to do the same test with \a\z\ and \b\a\ (last folder in \a\ against first folder

Worse than just a beginner

2006-10-24 Thread Brian
without any of the code being viewable with the exception of the html code. I know it's a big ask, but I would really appreciate it. Thanks Brian -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>

Re: Worse than just a beginner

2006-10-24 Thread Brian
Omega -1911 wrote: On 10/24/06, Brian <[EMAIL PROTECTED]> wrote: I'm wondering if someone can do me an enormous favour and write a cgi for me please, I just can't get my head around the books I have, Sounds like a homework assignment... Not at all , and just for the recor

Removing leading whitespace and removing alternate newlines

2010-10-31 Thread Brian
simplest way of getting even line numbers to print on the same line as odds? Thanks muchly Brian

Re: Removing leading whitespace and removing alternate newlines

2010-10-31 Thread Brian
Thank you Shlomi, I'll test part 2 tomorrow when I have more time. As for part one, what would be the better way of writing the code so that I can read/treat one line at a time? thanks again Brian From: Shlomi Fish To: beginners@perl.org Cc: Brian Sent

Re: Removing leading whitespace and removing alternate newlines

2010-10-31 Thread Brian
Thanks Shlomi, your "untested" code worked first time. :-) From: Shlomi Fish To: beginners@perl.org Cc: Brian Sent: Sun, October 31, 2010 4:23:52 PM Subject: Re: Removing leading whitespace and removing alternate newlines On Sunday 31 October 201

Re: Removing leading whitespace and removing alternate newlines

2010-10-31 Thread Brian
Thank you John From: John W. Krahn To: Perl Beginners Sent: Sun, October 31, 2010 8:59:43 PM Subject: Re: Removing leading whitespace and removing alternate newlines Brian wrote: > Hi guys, long time no working with PERL :-) Hello, > I have just ins

Compare files

2010-10-31 Thread Brian
. if the item in file 1 doesn't exist in file 2, insert/append the line so that file 2 becomes fredbloggs,0 joebloggs,4 joeblow,6 Again, thanks for helping, it's much appreciated. Brian

Re: Compare files

2010-11-01 Thread Brian
ne much of this type of thing on my pc for almost a year. From: Jim Gibson To: beginners@perl.org Sent: Mon, November 1, 2010 6:44:57 AM Subject: Re: Compare files At 9:34 PM + 10/31/10, Brian wrote: >Thanks for the previous help, that triggered a few

Re: Compare files

2010-11-01 Thread Brian
one file to another, maybe for the sake of sanity it might be better to handle both input files and output to a 3rd work file, which can be renamed later. Also, what would be the best parms to open the necessary input files? thanks Brian From: shawn wilson

RE: help with - use HTML::Template;

2002-03-23 Thread Brian
::Carp qw(fatalsToBrowser); This will force errors to be displayed in your web browser, saves you the trouble of digging through error logs. Good luck! Brian Johnson Up & Running (http://www.uarss.com) Computer Service/Software Development Phone: 906-483-4917 E-Mail: [EMAIL PROTECTED] For

RE: Transferring files from a client

2002-03-27 Thread Brian
dwide confusion and the end of civilization as we know it. Multiple input boxes are about all you can do in this situation I think. 'Tis unfortunate, but true. Brian Johnson Up & Running (http://www.uarss.com) Computer Service/Software Development Phone: 906-483-4917 E-Mail: [EMAIL PROTECTED]

Array of Array refs

2007-05-28 Thread Brian
Hi All- I am trudging through some DBI, XML, etc.. I had a problem and was baffled by how to get at array elements out of a series of pushed array refs. But, by simplifying the problem, I found that the syntax I used was in error. here is the small sample, already debugged. Hope this helps someon

Re: Array of Array refs

2007-05-28 Thread Brian
On May 27, 9:00 pm, [EMAIL PROTECTED] (Brian) wrote: > Hi All- > I am trudging through some DBI, XML, etc.. I had a problem and was > baffled by how to get at array elements out of a series of pushed > array refs. But, by simplifying the problem, I found that the syntax I > us

  1   2   3   4   5   6   7   >