Re: newbie pipe stdin to sendmail

2016-11-03 Thread Mark Coetser
On 02/11/2016 22:14, Andy Bach wrote: #!/usr/bin/perl my $vacation_forward = 'vacat...@domain.com '; open(OUT, "|/usr/sbin/sendmail $vacation_forward") or die ("Can't sendmail - $!"); my $email_addr_to = ''; while ( <>) { $email_addr_to = $1 if /^To: (.*)$/; print

Re: newbie pipe stdin to sendmail

2016-11-02 Thread Mark Coetser
On 02/11/2016 19:35, Andy Bach wrote: On Wed, Nov 2, 2016 at 9:13 AM, Mark Coetser <m...@tux-edo.co.za <mailto:m...@tux-edo.co.za>> wrote: $parser->ignore_errors(1); $parser->output_to_core(1); my $entity = $parser->parse(\*STDIN); my $error = ($@ |

newbie pipe stdin to sendmail

2016-11-02 Thread Mark Coetser
Hi OK, complete newbie to perl. I am busy playing around/learning and I wanted to create a simple perl script that I can pipe an email too and then grab the To header and output that and then pipe the unmodified email to sendmail with a different recipient... similar to cat

Re: Variables disappearing in code

2012-10-09 Thread Mark Haney
On 10/05/2012 11:38 AM, Shlomi Fish wrote: Hi Mark, please include a self-contained, minimalised, reproducing example, so we can see what you are doing wrong. Moreover, sometimes minimalising the code to something more self-contained helps you find the problem. Regards, Shlomi

Re: Variables disappearing in code

2012-10-09 Thread Mark Haney
On 10/09/2012 08:20 AM, Mark Haney wrote: So, this is obviously a problem bigger than just this one routine. But bugger me if I know where to go from here. I don't even know what to say now. I have it working. I'm not entirely sure /why/ it works, but it does. Just for fun, I changed

Variables disappearing in code

2012-10-04 Thread Mark Haney
I've got a Template Toolkit template that is driving me insane. I've hit the TT list, but it seems more and more like the problem may be more perl related than a templating issue. I've attached the offending files so now let me show what the problem is. I have two SQL statements that pull

Re: cgi development environment

2012-09-18 Thread Mark Haney
if you like. I had to write up a setup sheet when I was working on a project. -- Mark Haney Software Developer/Consultant AB Emblem ma...@abemblem.com Linux marius.homelinux.org 3.5.1-1.fc17.x86_64 GNU/Linux -- To unsubscribe, e-mail: beginners-cgi-unsubscr...@perl.org For additional commands

Using different libraries dynamically

2012-09-12 Thread Mark Haney
. -- Mark Haney Software Developer/Consultant AB Emblem ma...@abemblem.com Linux marius.homelinux.org 3.5.1-1.fc17.x86_64 GNU/Linux -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/

Re: Using different libraries dynamically

2012-09-12 Thread Mark Haney
On 09/12/2012 10:57 AM, Rob Dixon wrote: Hey Mark I suggest you use set the MYLIBPATH environment variable to the directory you want to use and then do use lib $ENV{MYLIBPATH} at the head of your program HTH, Rob Thanks Rob, I'll look into it. -- Mark Haney Software Developer

Package modules and EXPORTER use

2012-08-02 Thread Mark Haney
special about the content or syntax, etc about the package that doesn't use it. So, should I use it? Does it really matter in small apps? What am I missing here? -- Mark Haney Software Developer/Consultant AB Emblem ma...@abemblem.com Linux marius.homelinux 3.4.6-1.fc16.x86_64 GNU/Linux

Re: Package modules and EXPORTER use

2012-08-02 Thread Mark Haney
On 08/02/2012 09:57 AM, Shlomi Fish wrote: Hi Mark, So, should I use it? Does it really matter in small apps? What am I missing here? Can you give a code sample that reproduces the issue? Let me see if I can explain better. I have a Package called EMBMON::DAO which (as may

Slightly OT: POST data to perl script

2012-07-24 Thread Mark Haney
can't say (but suspect) if the first digit only = 0 if it gets dropped, since the data won't come with that output. I know this is an HTML type issue, but is there something I'm missing? Maybe an escape char that would keep that from happening? -- Mark Haney Software Developer/Consultant AB

Re: Slightly OT: POST data to perl script

2012-07-24 Thread Mark Haney
On 07/24/2012 12:20 PM, Shawn H Corey wrote: On Tue, 24 Jul 2012 11:53:33 -0400 Mark Haney ma...@abemblem.com wrote: The problem I'm seeing in tcpdump is that it appears that the first two integers are being dropped if they are both zeroes. You could reconstruct the leading zeros in your

Re: Check parameters for a checkbox

2012-06-15 Thread Mark Haney
On 06/11/2012 03:51 PM, Mark Haney wrote: my %attrs = ( shift_name = $q-param('shift_name'), shift_beg = $q-param('shift_beg'), shift_end = $q-param('shift_end'), factory_id = $q-param('factory'), shift_days = $q-param('DoW'), ); When I run the script I get this in apache's error.log: DBIx

Re: Check parameters for a checkbox

2012-06-15 Thread Mark Haney
-schema-resultset('Shifts')-new({ shift_days = $attrs-{shift_days}, factory = $attrs-{factory}, }); $m-insert; } Would get me the list data from the DoW paramter passed to the original CGI script? -- Mark Haney Software Developer/Consultant

Check parameters for a checkbox

2012-06-11 Thread Mark Haney
something simple, but I've not found any help on Google explaining how checkbox data is passed in a form. Any ideas? -- Mark Haney Software Developer/Consultant AB Emblem ma...@abemblem.com Linux marius.homelinux 3.3.7-1.fc16.x86_64 GNU/Linux -- To unsubscribe, e-mail: beginners-unsubscr

Re: mod_perl for n00bs

2012-06-05 Thread Mark Haney
On 06/04/2012 09:25 PM, pangj wrote: I want to understand why Mark thinks he needs mod_perl. If it's just because he wants to speed up his app (soup up the engine) there might be things he can do that don't require rewriting a lot of code, or spending a lot of time learning a lot of new ways

Re: mod_perl for n00bs

2012-06-04 Thread Mark Haney
and been told is that mod_perl is a better fit than using CGI.pm like I've been doing. -- Mark Haney Software Developer/Consultant AB Emblem ma...@abemblem.com Linux marius.homelinux 3.3.7-1.fc16.x86_64 GNU/Linux -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands

Re: mod_perl for n00bs

2012-06-04 Thread Mark Haney
with Perl. This means things like altering request flow, authentication, and the like--not Web apps. Okay, you've talked me into it. What's the learning curve for Dancer? Or Web::Simple? How hard is it to convert existing CGI.pm code into the framework? -- Mark Haney Software Developer

mod_perl for n00bs

2012-06-03 Thread Mark Haney
don't let that be a hindrance. Thanks in advance. -- Mark Haney Software Developer/Consultant AB Emblem ma...@abemblem.com Linux marius.homelinux 3.3.7-1.fc16.x86_64 GNU/Linux -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org

Utility for generating DB schema?

2012-06-01 Thread Mark Haney
A while back I used a utility that generated database Schema perl modules automatically. Now I can't remember what that utility was called, does anyone else know? I'd prefer not creating these by hand if I can help it. -- Mark Haney Software Developer/Consultant AB Emblem ma

Re: Utility for generating DB schema?

2012-06-01 Thread Mark Haney
On 06/01/2012 08:54 AM, John SJ Anderson wrote: Look at DBIx::Class::Schema::Loader. Yeah, but I could have sworn there was another utility that did the same thing. Maybe a wrapper around that module or something. I just can't remember it. Ah well. Thanks anyway. -- Mark Haney

Bareword and strict subs

2012-05-31 Thread Mark Haney
-resultset('Shifts')-new(attrs); $m-insert; } I've googled this error, but what I've found is not very informative. I have no idea what a Bareword is in the Perl context. Can someone explain what's going on? -- Mark Haney Software Developer/Consultant AB Emblem ma...@abemblem.com Linux

Closing CGI/DB connections

2012-05-21 Thread Mark Haney
this is handled, since I don't see a close() or disconnect() used in any of the existing, inherited, code, which I normally use just to clean up after the script runs. What's the best way to do this? -- Mark Haney Software Developer/Consultant AB Emblem ma...@abemblem.com Linux marius.homelinux 3.3.5-2

Re: Template toolkit issue [SOLVED]

2012-05-08 Thread Mark Haney
. Lou and Mark Rob Tweren't me. I did post a similar reply to yours, but I wasn't the one wanting to opt out. -- Mark Haney Software Developer/Consultant AB Emblem ma...@abemblem.com Linux marius.homelinux 3.3.4-3.fc16.x86_64 GNU/Linux -- To unsubscribe, e-mail: beginners-unsubscr

Re: Template toolkit issue [SOLVED]

2012-05-07 Thread Mark Haney
to unsubscribe: To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/ -- Mark Haney Software Developer/Consultant AB Emblem ma...@abemblem.com Linux marius.homelinux 3.3.2-6.fc16.x86_64 GNU/Linux -- To unsubscribe, e

Re: Template toolkit issue [SOLVED]

2012-05-03 Thread Mark Haney
. It's been greatly appreciated, but I'm about as frustrated as I can possibly be. -- Mark Haney Software Developer/Consultant AB Emblem ma...@abemblem.com Linux marius.homelinux 3.3.2-6.fc16.x86_64 GNU/Linux -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail

Re: Template toolkit issue [SOLVED]

2012-05-03 Thread Mark Haney
the module in the first place. (Although the latter is completely irrelevant other than for my personal curiosity.) Any resources out on the web about this will be greatly appreciated. -- Mark Haney Software Developer/Consultant AB Emblem ma...@abemblem.com Linux marius.homelinux 3.3.2-6.fc16

Re: Template toolkit issue [SOLVED]

2012-05-03 Thread Mark Haney
On 05/03/2012 10:49 AM, Lawrence Statton wrote: On 05/03/2012 07:41 AM, Mark Haney wrote: On 05/02/2012 03:53 PM, Octavian Rasnita wrote: I'm really quite intrigued by the assertion that CGI is very seldom used. Well, do you mean CGI.pm the perl module, which is, AFAIK rarely used any

Template toolkit issue

2012-05-02 Thread Mark Haney
file into a folder and open it in a browser (on the same server mind you) I get the correct rendering of the page. So, what the devil am I missing? I'll be glad to send my stuff to someone offlist to work on this, since it might be slightly OT, but I'll take any help I can get. -- Mark Haney

Re: Template toolkit issue

2012-05-02 Thread Mark Haney
, the output includes a large amount of whitespace at the top above the !DOCTYPE tag. Could that be a problem? -- Mark Haney Software Developer/Consultant AB Emblem ma...@abemblem.com Linux marius.homelinux 3.3.2-6.fc16.x86_64 GNU/Linux -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org

Re: Template toolkit issue

2012-05-02 Thread Mark Haney
' }); $template-process($file, $vars) || die Template process failed: , $template-error(), \n; And attached is the exact HTML output of the script copied and pasted directly from the browser output. That output, btw, renders on the server just fine when I open the file directly. -- Mark

Re: Template toolkit issue

2012-05-02 Thread Mark Haney
CGI scripts I have that generate reports. I suppose I'm not able to be any more clear, since I'm not sure even what the problem is. -- Mark Haney Software Developer/Consultant AB Emblem ma...@abemblem.com Linux marius.homelinux 3.3.2-6.fc16.x86_64 GNU/Linux -- To unsubscribe, e-mail

Re: Template toolkit issue [SOLVED]

2012-05-02 Thread Mark Haney
back to PHP and it's more complete and useful documentation. -- Mark Haney Software Developer/Consultant AB Emblem ma...@abemblem.com Linux marius.homelinux 3.3.2-6.fc16.x86_64 GNU/Linux -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h

Re: PERL CGI, HTML and PHP

2012-04-26 Thread Mark Haney
look into them now. My apologies for sounding like a troll. It was a question I thought had a quick answer. You live and learn. -- Mark Haney Software Developer/Consultant AB Emblem ma...@abemblem.com Linux marius.homelinux 3.3.2-6.fc16.x86_64 GNU/Linux -- To unsubscribe, e-mail

Re: PERL CGI, HTML and PHP

2012-04-26 Thread Mark Haney
On 04/26/2012 08:27 AM, Bob McConnell wrote: From: Mark Haney This exposes the source of your confusion. Javascript is executed in the browser, while Perl, PHP, ASP and JSP are all executed on the server. So JS simply complements all of the others. The biggest issue is that you cannot

PERL CGI, HTML and PHP

2012-04-25 Thread Mark Haney
is the best way to handle this? I'll take any and all suggestions. I've never had to do this particular function before so I'm grasping at straws. Thanks. -- Mark Haney Software Developer/Consultant AB Emblem ma...@abemblem.com Linux marius.homelinux 3.3.1-5.fc16.x86_64 GNU/Linux

Re: PERL CGI, HTML and PHP

2012-04-25 Thread Mark Haney
On 04/25/2012 02:54 PM, Matthew K wrote: Mark, - Original Message - From: Mark Haneyma...@abemblem.com To: Perl Beginnersbeginners@perl.org Cc: Sent: Wednesday, April 25, 2012 11:51 AM Subject: PERL CGI, HTML and PHP I've got, what I hope is a fairly simple problem that someone can

Re: perl DBI n00b

2012-01-12 Thread Mark Haney
On 01/11/2012 09:58 AM, Mark Haney wrote: I'm pretty new to the perl DBI world, so can someone point me to a good tutorial/reference site or book or something? I'm very proficient with databases and pretty good with basic perl, but not used together. Any help would be appreciated. I really

perl DBI n00b

2012-01-11 Thread Mark Haney
I'm pretty new to the perl DBI world, so can someone point me to a good tutorial/reference site or book or something? I'm very proficient with databases and pretty good with basic perl, but not used together. Any help would be appreciated. -- To unsubscribe, e-mail:

problem with passing variables

2011-12-30 Thread Mark Haney
wrong? - Mark Haney -- To unsubscribe, e-mail: beginners-cgi-unsubscr...@perl.org For additional commands, e-mail: beginners-cgi-h...@perl.org http://learn.perl.org/

problem with passing variables

2011-12-30 Thread Mark Haney
wrong? - Mark Haney -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/

Re: problem with passing variables

2011-12-30 Thread Mark Haney
On 12/30/2011 12:30 PM, Igor Dovgiy wrote: Hi Mark, If your variables are strictly internal and by no means might be ever tainted (read: user input), what you're doing is mostly ok. But you need to quote the dates passed within query itself, like this: my $sql = qq/SELECT * FROM `events

Re: problem with passing variables

2011-12-30 Thread Mark Haney
On 12/30/2011 12:50 PM, Igor Dovgiy wrote: If you pass into SQL query something assigned by user, use placeholders by all means. ) It's not that hard, but it'll save you a lot of headaches, believe me. ) 2011/12/30 Mark Haney ma...@abemblem.com mailto:ma...@abemblem.com But there's

Re: Guidance for a New Programmer/Perl User

2011-12-16 Thread Mark Tiesman
up to this point. Mark On 12/16/2011 4:44 AM, Shlomi Fish wrote: Hi Rob, On Thu, 15 Dec 2011 22:27:22 + Rob Dixonrob.di...@gmx.com wrote: Decades of programming in many languages have convinced me that Perl excels in every aspect. But I have to agree with Rajeev that Perl 6 has become

Guidance for a New Programmer/Perl User

2011-12-15 Thread Mark Tiesman
advice, reading material, classes, and general information on learning to program and Perl. Any help provided is GREATLY appreciated. Thanks!! -- Mark -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/

Re: Guidance for a New Programmer/Perl User

2011-12-15 Thread Mark Tiesman
Thanks Frank. I'll add that to my list. ;-) Mark On 12/15/2011 10:07 AM, frank cui wrote: I found Perl By Example 4th Edition book pretty help, and you may want to give a look on that one. Frank On Thu, Dec 15, 2011 at 11:54 AM, Mark Tiesman mark.ties...@doit.wisc.edu mailto:mark.ties

Re: Guidance for a New Programmer/Perl User

2011-12-15 Thread Mark Tiesman
shlomi, Thanks for the link. I have bookmarked:-) On 12/15/2011 11:56 AM, Shlomi Fish wrote: Hi Mark, On Thu, 15 Dec 2011 09:54:17 -0600 Mark Tiesmanmark.ties...@doit.wisc.edu wrote: Hi all. I recently started a job that at some point is going to require me knowing and using Perl. I am

Re: Safely updating a file

2011-11-23 Thread Mark Wagner
On Tue, Nov 22, 2011 at 15:33, tshtatland tshtatl...@gmail.com wrote: On Nov 22, 4:27 pm, carni...@gmail.com (Mark Wagner) wrote: I want to update a status file, similar to this: open OUTFILE, , status.txt; print OUTFILE $last_date\n; close OUTFILE; However, if something goes wrong (e.g

Safely updating a file

2011-11-22 Thread Mark Wagner
contents if something goes wrong? -- Mark Wagner -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/

Re: Perl modules that phone home

2011-07-29 Thread Mark Wagner
Perl modules are ordinary text files, so grepping around in the modules directory for things like mailsrv or wdfgh should tell you which modules are responsible. -- Mark Wagner -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http

Padre IDE

2011-04-16 Thread mark baumeister
Hi, I'm trying to use the Padre IDE for perl. From what I have read I guess it is not really a bonified IDE. However, I have read that one can at least use it to debug your code. It also has a feature to run your scripts. I have tried both of this functions with little success. If I have my

move array elements to hash

2011-04-16 Thread mark baumeister
Hi, I am trying to move array elements (populated from the STDIN) into a hash as pairs [i] and [i + 1] and then print them out using the code below. If I enter bob as the first element and hit enter I get the error messages below. I guess there are multiple problems with my code. For one it

writing to output using filehandles

2011-04-12 Thread mark baumeister
Hi I am having trouble with my search and replace code in the program below. I can sucessfully copy the input file to the output file but my search and replace is not working. Any hints on what I am doing wrong? Thanks, M #!/usr/bin/perl -w use strict; my $input; my $output; my $search; my

Detecting if input is provided

2011-03-14 Thread Mark
I need to detect if input has been to my script or not. For example, I would like to differentiate between an invocation from the two lists below: Examples where input is provided: perl myscript.pl input.txt perl myscript.pl input.txt executable_that_writes_to_sdtout | perl myscript.pl Example

Re: Detecting if input is provided

2011-03-14 Thread Mark
On Mar 14, 2:06 pm, jimsgib...@gmail.com (Jim Gibson) wrote: The standard Unix function for determining this is isatty(in fd), where fd is the file descriptor for the input/output stream. I don't know the equivalent in Windows. However, there is the file test operator -t that returns true if

repost : installing CPAN modules as part of application stack

2011-02-03 Thread Mark Meyer
of an approach ? is anyone else faced with this same task and doing something differently? Thank you, mark Mark Meyer Senior Software Engineer Primex Family of Companies 965 Wells Street Lake Geneva, WI 53147 mme...@primexinc.com 262-249-2384 - Direct 262-348-9626 - Fax 262

need to include and install CPAN modules as part of application stack

2011-01-27 Thread Mark Meyer
based, so perl is available (as part of openSuSE 11.3) along with various perl rpms. Thank you, mark

RE: Need help with Use of uninitialized value in concatenation (.) or string

2011-01-27 Thread Mark Meyer
Can you send an example of the data in the log file? tm -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/

RE: Need help with Use of uninitialized value in concatenation (.) or string

2011-01-27 Thread Mark Meyer
Ok I took your code and your log file and did some testing on my linux box. this small snippet of code seems to parse the lines (you actually want to grab) in a predictable manner. tm while(( my $line = FILEHANDLE)) { # print my line is: $line, \n; if ($line =~ /^\[/) {

Re: [OT] New Document: How to Start Contributing to or Using Open Source Software

2010-12-30 Thread Mark Voltz
reference coding styles and idioms that seem to be agreed upon by the majority of the Perl community. I look forward to your feedback when the time comes. Thanks, Mark

Re: Behavior of Regex modifier /x

2010-12-27 Thread Mark
On Dec 27, 2:34 pm, paragka...@gmail.com (Parag Kalra) wrote: I was under the impression that regex modifier '/x' ignores the white space. It ignores white space in the regular expression, not in the text you are matching. For example, the following are equivalent: if($str =~/$str3/x){

nested loops

2010-12-20 Thread Mark M Huntress
I want to nest a for loop in a for loop in a while loop, and I can't even get just the first nesting to work yet. Here is the relevant part of my scripting. open(XYZ,$ARGV[0]ready.xyz); #while (XYZ) { #chomp($_); for ($z = 0, $z = $#sortedstart, $z++) { for ($i = $sortedstart[$z], $i

Re: Sorting files in a directory, without using any OS specific command, ordered by modified timestamp

2010-12-01 Thread Mark
On Dec 1, 7:31 am, jwkr...@shaw.ca (John W. Krahn) wrote: Correction: my @sorted_files_in_directory =      map $_-[ 1 ],      sort { $a-[ 0 ] = $b-[ 0 ] }      map { ( stat $directory_name/$_ )[ 9 ], $_ } map { [ ( stat $directory_name/$_ )[ 9 ], $_ ] }    

build a download and upgrade facility in perl for our application stack

2010-11-17 Thread Mark Meyer
comments / advice / suggestions. mark Mark Meyer Senior Software Engineer Primex Family of Companies 965 Wells Street Lake Geneva, WI 53147 mme...@primexinc.com 262-249-2384 - Direct 262-348-9626 - Fax 262-745-8840 - Cell

Re: Email Filter Script

2010-10-24 Thread Mark
complete manual goes nowhere), this is what I wrote: my $recipient = 'Mark Vecchio mvecc...@mcc.commnet.edu'; Email::Sender::Simple-send($line, { to = $recipient }); It doesn't work, I hope for reasons that are obvious to some of you out there. The script does run without throwing any errors

Email Filter Script

2010-10-22 Thread Mark
, as you suggested (to replace the clumsy regex), but I just don't have the experience to be able to understand how to use them without more serious study of the language. - Mark Below is a sample Outlook-forwarded e-mail, which shows the egregious alterations in action. # [...Various Headers

Re: Email Filter Script

2010-10-22 Thread Mark
set it up in the IT office, and since that day have not seen the forwarding menu option in the webmail interface in any other location either on or off campus. (Haven't been back to the IT office, as they had minimal ability to be helpful on this issue). - Mark

Re: Sending an E-Mail

2010-10-12 Thread Mark
can't install it on my Macbook Pro in order to test it locally. I've tried to install several different ways, the latest being a manual compile install of 'Bundle-Email'. When I tried 'make test', I got the output below. What am I doing wrong? - Mark $ make test /usr/bin/perl -Iinc Makefile.PL

Sending an E-Mail

2010-10-10 Thread Mark
, and then concluding by printing $line in the Terminal. Also, I apologize for all the inelegance of this code -- repeated sections instead of functions, probably sloppy regex, and so on. This is rookie stuff.) - Mark #!/usr/bin/env perl use warnings; use strict; use Data::Dumper; GET THE FULL E-MAIL

No Output in Terminal

2010-09-30 Thread Mark
yields Test.pl syntax OK So how come no Hello world!? I really want Perl to have me at Hello World. What should I do? - Mark -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/

Re: No Output in Terminal

2010-09-30 Thread Mark
forgot to mention in my first post that I did try perl -e 'print Hello World' and it worked just fine. Cheers, Parag - Mark -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/

Re: No Output in Terminal

2010-09-30 Thread Mark
in VirtualBox, and I get the same result in a root terminal there, too. -- That is, when I change directory to the exact same script file and type perl test.pl. - Mark

Re: No Output in Terminal

2010-09-30 Thread Mark
or $_ 126 } map ord, split //' t.pl It will tell use what control characters may be lurking in that file of yours. Here is the output from the above command: 13 13 13 13 What does that mean? - Mark -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h

Re: No Output in Terminal

2010-09-30 Thread Mark
the script ran perfectly in iTerm. Problem apparently solved. Thanks, everyone! - Mark

RE: How to set LD_LIBRARY_PATH

2010-05-30 Thread Bobak, Mark
will continue to do the right thing. -Mark From: Paul Johnson [p...@pjcj.net] Sent: Friday, May 28, 2010 12:33 To: John Scoles Cc: newbie01 perl; beginners; dbi-users Subject: Re: How to set LD_LIBRARY_PATH On Fri, May 28, 2010 at 06:14:38AM -0400, John Scoles

Re: Larry's filename fixer

2009-10-16 Thread Mark Wagner
expands it. It doesn't really matter, because by the time @ARGV is populated, it's been expanded and the script only ever sees the expansion. -- Mark Wagner -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/

Re: Taint mode user supplied file names

2009-08-26 Thread Mark Wagner
popular attack) the forum's username/password list. -- Mark Wagner -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/

Re: A side note [was Re: Attentipn Please!! Need A Perl script to yada yada]

2009-08-18 Thread Mark
Hello, There is always a better way to do things. That is what makes life interesting. I think any contributions from anybody should be appreciated. Regards Mark - Original Message - From: Telemachus telemac...@arpinum.org To: beginners@perl.org Sent: Tuesday, August 18, 2009 12

Subroutine getting its own path

2009-01-27 Thread mark . malyj
I’m a database guy, but Perl is new to me. I have a script called ServiceScript.pl that contains a subroutine called ServiceRoutine. This routine connects to a database and returns data into an array. I want my customer to be able to call this subroutine from any of their hundreds of perl scripts,

Re: Subroutine getting its own path

2009-01-27 Thread mark . malyj
Sorry, I had a typo. My code snippet above should have said: require 'ServiceScript.pl'; my $svccmdline = $uspname $uspparams; $rtncode = ServiceRoutine($svccmdline, \...@rtndata); - Marko -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail:

RE: Subroutine getting its own path

2009-01-27 Thread Malyj, Mark
Shawn, Your code my ( $whoami ) = grep { m{ \b ServiceScript \. pl \b }msx } values %INC; print $whoami\n; works great!! If you have time, could you explain to a Windows guy like me what the grep is doing? Yes, I know that someone could still spoof me, but this is my first line of defense. -

Re: LWP getting special (multibyte) characters from webpages

2009-01-02 Thread Mark Wagner
the page is in). -- Mark -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/

piece of Perl code needed for tracking clicks

2008-12-09 Thread Mark Tarver
Hi, I have a very simple request. I want to know how many people click on a link. So what I want is a piece of Perl that writes this to a file. It can just be a tally mark like ! placed in the file. I cannot place anything on the target page because it does not belong to me. Code gratefully

Why is my regex so slow?

2008-10-31 Thread Mark Wagner
I'm having, download http://download.wikimedia.org/eswiki/20081018/eswiki-20081018-all-titles-in-ns0.gz (a 4.1-MB file), unzip it, and run the program supplying the name of the unzipped file. Thanks, Mark Wagner -- binmode STDIN, :utf8; # Comment this out to speed things up while

Re: signal processing INT or TERM

2008-10-31 Thread Mark Wagner
, but if you wake up periodically to go through the loop, you'll be fine. -- Mark Wagner -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Re: Why is my regex so slow?

2008-10-31 Thread Mark Wagner
be replace as: print Match\n if($target eq $regex); This doesn't even do what my sample does, much less the full program. String equality is not the same thing as substring matching, and neither can do what the regular expression '.*colou?r.*' does. -- Mark -- To unsubscribe, e-mail: [EMAIL

unix-like 'exec' in perl?

2008-08-24 Thread Mark Henry
Hi All, I want to be able to restart a script under certain conditions, and I was thinking of how I would do this using exec in ksh. exec as I understand it is 'replace the current process with the specified program', where in perl it seems to be 'run the specified program but dont wait for it

Re: Text to hex

2008-05-10 Thread Mark Wagner
On Fri, May 9, 2008 at 10:02 PM, John W. Krahn [EMAIL PROTECTED] wrote: Mark Wagner wrote: Given a string of text, how do I convert it to a string of hexadecimal values? For example, given the string Hello, I want the string 48 65 6C 6C 6F. $ perl -le'my $string = Hello; print unpack H

Text to hex

2008-05-09 Thread Mark Wagner
Given a string of text, how do I convert it to a string of hexadecimal values? For example, given the string Hello, I want the string 48 65 6C 6C 6F. -- Mark -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Re: [PHP] Arbitrary mathematical relations, not just hashes

2008-04-07 Thread Mark J. Reed
As far as languages with two-way relation go, there are many; perhaps the most prototypical is Lisp, in that either member of a pair within an alist can be used to look the pair up, with no extra function or second map definition required. But PHP has pretty good support, too, actually. If you

Re: [PHP] Arbitrary mathematical relations, not just hashes

2008-04-07 Thread Mark J. Reed
: color.inject([]) { |a,p| a p[0] if p[1] == :red; a } In Perl5 I don't have a better solution than the first one above: my %color = ( apple = 'red', ruby = 'red', banana = 'yellow'); grep { $color{$_} eq 'red' } keys %color; -- Mark J. Reed [EMAIL PROTECTED] -- To unsubscribe, e-mail: [EMAIL PROTECTED

Re: Using PERL to retrieve MP3s

2008-04-03 Thread Mark Wagner
expression. Without knowing what $response-content contains, I can't be sure if there's a better solution, but my ($url) = $response-content =~ /http:\S?\.mp3/; should work. -- Mark -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http

Re: Question about CGI.pm

2008-03-25 Thread Mark Wagner
. -- Mark Wagner -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Re: how to search manual for use strict

2008-03-13 Thread Mark Wagner
On 3/13/08, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hi, I want to read the installed perl manual on use strict, so how do I search the perl manual for use strict Does perldoc strict not work for you? -- Mark -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail

Dependancies

2008-02-18 Thread Mark Wagner
Is there any easy way to get a list of all modules loaded by a Perl script? -- Mark Wagner -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Re: lstat and its uses

2008-02-11 Thread Mark Wagner
, and I believe you can omit trailing undefs. -- Mark Wagner -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Re: Using 'sendmail'

2008-01-03 Thread Mark Wagner
addresses on standard input, you need to invoke sendmail as sendmail -t. -- Mark -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

How to open a file and perform an action on it.

2007-12-09 Thread Mark
believe that it is as easy as, open(INFO, datafile) || die(can't open datafile: $!); In other words how does it know what software to open the datafile with? If I could get a look at sample code of this, that would be a HUUGE help. Thanks in advance, Mark -- To unsubscribe, e-mail: [EMAIL

Re: How to open a file and perform an action on it.

2007-12-09 Thread Mark
with the pipe operator more and see what happens. Thanks [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Mark [EMAIL PROTECTED] writes: I have looked at the perlopen tuturial, but I am still not sure how to accomplish this. I just can't believe that it is as easy as, open(INFO

  1   2   3   4   5   6   7   8   9   >