Wildcards not working

2002-10-27 Thread mike
I am trying to cd into a directory referenced by a value in a list with wildcards like shell command ls test* or cd test* however nothing seems to work, I have tried amongst others $dir9= system(ls $dir1.*\$); opendir(DIRLIST,.); $dir9=grep$dir1.*\$, readdir DIRLIST -- Linux, Gnome what more do

extra characters return plus 0 in script

2002-11-21 Thread mike
I'm getting confused - I have the following script open(DESK,gtkdoclist) or die cant open; @desk1=DESK; foreach $desk1 (@desk1){ chomp $desk1; print $desk1\n; $gtkdoc1=system(grep -h gtk_doc_min_version= $desk1); chomp $desk1; print $gtkdoc1; however the output is this (notice the zeros at the

Re: extra characters return plus 0 in script

2002-11-22 Thread mike
On Fri, 2002-11-22 at 05:44, John W. Krahn wrote: Mike wrote: I'm getting confused - I have the following script open(DESK,gtkdoclist) or die cant open; @desk1=DESK; foreach $desk1 (@desk1){ chomp $desk1; print $desk1\n; $gtkdoc1=system(grep -h gtk_doc_min_version= $desk1

Re: extra characters return plus 0 in script

2002-11-22 Thread mike
On Sat, 2002-11-23 at 04:50, John W. Krahn wrote: Mike wrote: On Fri, 2002-11-22 at 05:44, John W. Krahn wrote: Mike wrote: I'm getting confused - I have the following script open(DESK,gtkdoclist) or die cant open; @desk1=DESK; foreach $desk1 (@desk1){ chomp

Problem calling sub

2003-01-04 Thread mike
; $dir3=getcwd(); print $dir3\n; system(/home/mike/rmla); }; -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Question about permissions

2004-04-09 Thread mike
I have developed an intranet perl/postgesql app which works fine except for one bizarre problem I have all the appropriate scripts with the following permissions -rw-r-xr-- 1 mike apache However periodically the permissions change with the group ownership changing. This is on Fedora with perl

OT - problem with script running on a refresh

2004-06-08 Thread mike
Hi I have a CGI/dbi script which whenever the page is reloaded the following executes print start_multipart_form (POST); print Subject, popup_menu(-name='Subject1',-values=[EMAIL PROTECTED]); print Area, popup_menu(-name='area1',-values=[EMAIL PROTECTED]),p; print

OT - problem with script running on a refresh

2004-06-08 Thread mike
Hi I have a CGI/dbi script which whenever the page is reloaded the following executes print start_multipart_form (POST); print Subject, popup_menu(-name='Subject1',-values=[EMAIL PROTECTED]); print Area, popup_menu(-name='area1',-values=[EMAIL PROTECTED]),p; print

Re: Mail::Sendmail

2004-06-09 Thread mike
On Wed, 2004-06-09 at 10:59 +0200, Miguel ngel Morales wrote: Hi all! I am using Mail::Sendmail module to send e-mails from my perl application but the text of these messages seems to be too much long and when receiving the e-mail the text of the message is not complete. Do yo know if

Very wierd problem with CGI.pm

2004-06-11 Thread mike
Has anyone ever come accross this wied problem before I have a script which pulls records from a DB then loops into a form and shows each record, with the id no being concatenated to the field name to give a unique record id. However if I have this

Re: Very wierd problem with CGI.pm

2004-06-14 Thread mike
On Sat, 2004-06-12 at 08:30 -0700, David Storrs wrote: On Fri, Jun 11, 2004 at 01:07:54PM +0100, mike wrote: Has anyone ever come accross this wied problem before I have a script which pulls records from a DB then loops into a form and shows each record, with the id no being concatenated

Passing httpd auth details to cgi-script

2004-06-24 Thread mike
Is it possible to pass user/password from apache auth to cgi-scripts. To explain I have apache set to authenticate using htpasswd, checking a file in /etc/httpd When users access the site they get a user/password prompt This then leads to a bunch of cgi-scripts which access DBI::DBDpg Is it

Re: Using MIME::Lite to send mail/or attachments

2004-06-24 Thread mike
On Wed, 2004-06-23 at 10:22 -0700, jason corbett wrote: Can anyone tell me where I can find MIME::Lite or any other perl method to send attachments/documents in mail format? If you have tips or scripts on using it to send mail (documents attached), please let me know. Thanks, JC try

Testing for empty value

2004-08-05 Thread mike
I have the following code print date times,@date,br; if ($ti1){ print time 1 is not empty; } else { print time 1 is empty; } If there is a value it works but not if there isn't ie: if there is a value it prints time 1 is not empty, but if there is not nothing comes out anyone any ideas? -- To

HELP! Reg-ex question

2003-06-27 Thread Mike
Given the following code snippet: - print $text\n; my $text=sour red apples; my $pattern=(sour); my $replacement=very \$1; $text=~s/$pattern/$replacement/; print $text\n; - I was expecting very sour red apples to be printed, but

Re: rearrange text

2003-08-30 Thread Mike
really learned a lot with the help you've given so far! -Thanks! -Mike In article [EMAIL PROTECTED], [EMAIL PROTECTED] (David Wall) wrote: --On Monday, August 25, 2003 6:50 PM -0400 Mike Robeson [EMAIL PROTECTED] wrote: OK, I feel like an idiot. When I initially asked for help with this I

Perl and Jscript Question

2002-06-14 Thread Mike
! Mike -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

very confused - chdir not working

2002-10-10 Thread mike
Hi I am building the following script to recurse back and forth down a directory tree Unfortunatel chdir does not work This is the script #!/usr/bin/perl -ww open(BLD_LIST,buildlist); my @pkg=BLD_LIST; my $ver=$ARGV[2]; my $name=$ARGV[0]; my $release=$ARGV[1]; foreach my $pkg (@pkg){ my

Re: very confused - chdir not working

2002-10-10 Thread mike
On Fri, 2002-10-11 at 05:36, Michael Fowler wrote: On Fri, Oct 11, 2002 at 04:16:41AM +0100, mike wrote: Unfortunatel chdir does not work In what way doesn't it work? Are you getting an error? How are you verifying it doesn't work? no errors but directory does not change with use script

Re: very confused - chdir not working

2002-10-11 Thread mike
On Fri, 2002-10-11 at 09:14, Michael Fowler wrote: On Fri, Oct 11, 2002 at 06:50:00AM +0100, mike wrote: On Fri, 2002-10-11 at 05:36, Michael Fowler wrote: On Fri, Oct 11, 2002 at 04:16:41AM +0100, mike wrote: Unfortunatel chdir does not work In what way doesn't it work? Are you

Re: very confused - chdir not working

2002-10-12 Thread mike
On Fri, 2002-10-11 at 23:08, Michael Fowler wrote: On Fri, Oct 11, 2002 at 04:40:30PM +0100, mike wrote: ../build.pl /root/cvs/esound # this the output of $dir3 / cannot change No such file or directory at ./build.pl line 13, BLD_LIST line 55. this is ls in same directory, as you

Re: DBI prepare syntax

2007-11-08 Thread Mike
That was a rookie mistake :). Double quotes works, thanks Beginner! Beginner [EMAIL PROTECTED] wrote: On 8 Nov 2007 at 8:59, Mike wrote: Hi, #Update override_exclude set th_flag=N to indicate that thesaurus entries #have been added to sierra2_thesaurus.xml use DBI; my

Re: DBI prepare syntax

2007-11-08 Thread Mike
Perl is Awsome! Thanks for explaining that basic concept to me Douglas! Douglas Hunter [EMAIL PROTECTED] wrote: Mike wrote: Hi, I have a variable setup as $pid and i've tried to call this in the prepare part of the DBI module but i'm get an Unknown column $pid syntax error. Probably

DBI prepare syntax

2007-11-08 Thread Mike
Hi, I have a variable setup as $pid and i've tried to call this in the prepare part of the DBI module but i'm get an Unknown column $pid syntax error. Probably $pid was passed as a string instead of a variable inside the prepare (''). Anyone has an idea of how i can fix this? Thanks.

Pass a wild card argument in Win32

2008-06-27 Thread Mike
I've searched google and much of this group to find the answer to this problem with no luck. I am able to pass regular arguments to perl but is it possible to get the * operator to work like it does in Linux? Like typing in *.cpp to pass perl all .cpp files. I already fixed the issue getting the

RE: extracting links from HTML data (7my own problem usiing grep

2002-01-16 Thread mike
On Wed, 2002-01-16 at 07:15, Gary Hawkins wrote: However the script continues print @list3; my $var1='META'; @lista= grep{$var1} @list3;## not picked up at all print @lista anyone any clues Suppose I'm a little confused but perhaps you meant: print @list3; @lista=

Re: Greedy 'split' ???

2002-01-16 Thread mike
On Thu, 2002-01-17 at 00:55, Michael Fowler wrote: On Wed, Jan 16, 2002 at 03:57:44PM -0800, Scott Lutz wrote: $DOM_NAME, my $TLD) = split(/\./, $domain); creates two variable out of an inputted domain name, until this comes along: domainname.org.uk which it interprets as

question re mtiong email tags

2002-01-17 Thread mike
Hi I have been trying to set oup a script for munging html files My problem is trying to match tags in html which of course have specific meanings in perl. Does anyone hve any advice on this or know of a good resource (this is something of a building up expertise in perl fundamentals so not

Perl Help

2002-01-22 Thread Mike
; If I do it this way it errors out via the web: #!/usr/bin/perl $logfile = '/usr/local/apache/logs/ipaccess.log'; $date = scalar localtime; open(IPLOG, $logfile) || die Cannot open $logfile; $ip = $ENV{'REMOTE_ADDR'}; print IPLOG $date; print IPLOG $ip; close IPLOG; Mike -- To unsubscribe

LISTBOX Problem

2002-02-06 Thread Mike
--compilation aborted at ./listfiles.pl line 14. Thanks Mike

Execute perl Script

2002-02-06 Thread Mike
How do you execute a perlscript within a perl script via the web? Mike -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Dates Perl SQL7

2002-02-20 Thread mike
On Wed, 2002-02-20 at 11:26, Mason, Andrew wrote: This is a concept question rather than a code question. I have a script which produces a simple report on some simple disk space stats for servers I work with. I thought it would be useful to put this information into a database on a daily

Passing Arguments into a Program

2002-04-12 Thread Mike
If a program calls a perl script as follows: /tmp/perltest.pl abc def ghi jkl mno Is there a variable which would contain the arguments? -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

input with the symbol

2002-04-12 Thread Mike
What happens if I call a perl script as follows: test.pl abc What picks up the abc inside the script? In shell scripting I would just use a read statement (read a). Is there a like function in perl? -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL

split delimiters query

2005-02-02 Thread mike
Am I right in thinking that if you double quote the seperator in split the seperator is added to the array ie: @array3=split(/\t/,$value4); would add \t to the end of @array3 while @array3=split(/\t/,$value4); would not -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands,

Re: split delimiters query

2005-02-02 Thread mike
On Wed, 2005-02-02 at 12:54 -0500, Jay wrote: On Wed, 02 Feb 2005 12:39:17 +, mike [EMAIL PROTECTED] wrote: Am I right in thinking that if you double quote the seperator in split the seperator is added to the array ie: @array3=split(/\t/,$value4); would add \t to the end of @array3

Re: split delimiters query

2005-02-02 Thread mike
On Wed, 2005-02-02 at 09:23 -0500, Wiggins d'Anconia wrote: mike wrote: Am I right in thinking that if you double quote the seperator in split the seperator is added to the array ie: @array3=split(/\t/,$value4); would add \t to the end of @array3 while As you have written it above I

DBI problem

2005-02-09 Thread mike
I have the following query which works in psql SELECT to_char('05 Feb 2005'::date,'-MM-DD') However when I run it in DBI I get $row6=$dbh-prepare(SELECT to_char('2005-02-05'::date,'-MM-DD')); #$row6-bind_param(1,'2005-02-05'); $row6-execute(); Can't call method prepare on an undefined

CGI/DBI - Can anyone work out why this fails

2005-02-11 Thread mike
I have the following code $cat1; if ($cat1){ my $cat1=%$category%; } else { $cat1=$category; } $row=$dbh-prepare(SELECT contact_id,first_name,last_name,organisation FROM tb_contacts WHERE (organisation ILIKE ? OR last_name ILIKE ?) OR contact_id = ?); $cat1; print $cat1;

RE: CGI/DBI - Can anyone work out why this fails

2005-02-14 Thread mike
On Fri, 2005-02-11 at 08:02 -0500, Bob Showalter wrote: mike wrote: I have the following code $cat1; if ($cat1){ my $cat1=%$category%; The my here is scoped to this if { } block, so you aren't changing the outer $cat1 } else { $cat1=$category; } $row=$dbh-prepare

CGI and sub question

2005-02-16 Thread mike
I have cgi script which works fine if I call another cgiscript. However if I transfer it to runas a sub within the original script some unwanted things happen some variables dissapear The script tries to run the run the sub on open, rather than after submit. After submitting, it is impossible

CGI and sub question

2005-02-16 Thread mike
I have cgi script which works fine if I call another cgiscript. However if I transfer it to runas a sub within the original script some unwanted things happen some variables dissapear The script tries to run the run the sub on open, rather than after submit. After submitting, it is impossible

Re: CGI and sub question

2005-02-16 Thread mike
On Wed, 2005-02-16 at 14:36 -0500, Chris Devers wrote: On Wed, 16 Feb 2005, mike wrote: [Does] anyone [have] any ideas[question-mark] Post the code. We cannot help you without being able to see the code in question. -- Chris Devers Here it is #!/usr/bin/perl -ww use CGI qw

DBI query

2005-03-15 Thread mike
Anyone got any any idea what is happening here $dbh=DBI-connect(dbi:Pg:dbname=data_cc,$user,$pw); $dump_dir='/home/data_cc/dump'; @names=$dbh-tables(); #$dbh-execute; #print @names; foreach $names(@names){ if (substr($names,0,9) eq public.tb) { $file1= $dump_dir\/$names; $dbh-prepare(COPY $names

DBI query

2005-03-15 Thread mike
Anyone got any any idea what is happening here $dbh=DBI-connect(dbi:Pg:dbname=data_cc,$user,$pw); $dump_dir='/home/data_cc/dump'; @names=$dbh-tables(); #$dbh-execute; #print @names; foreach $names(@names){ if (substr($names,0,9) eq public.tb) { $file1= $dump_dir\/$names; $dbh-prepare(COPY $names

Problem with DBD-Pg

2005-05-17 Thread mike
Since upgrading to FC4-test3 which has version 1.4.1 of DBD-Pg installed, placeholders no longer work for example the following code $cat='1'; #$cat=param('Category'); print $cat; print start_multipart_form (POST,'con_upd.pl'); $row=$dbh-prepare(SELECT type_code FROM lk_sort_of_contact WHERE

Help with a perl script to parse and email

2007-06-13 Thread Mike
I'm a perl newbie and need help with writing a script to do the following: 1) Open a file that is delimited. The file is in this format: name;email address1;user1;user2;userX; The delimiters can be changed. This is a manually created file. Email and user may be more than one item. 2)

Re: [NEWBIE-Question] Processing Menus

2001-11-01 Thread Mike
MAIL From: $in{'email'}\n; print MAIL Subject: Link Request\n; print MAIL Someone requests a link addition\n; print MAIL Category: $in{'category'}\n; print MAIL URL: $in{'url'}\n; print MAIL Description: $in{'description'}\n; close(MAIL); Thanks again Mike Etienne Marcotte wrote: The CGI

Re: [NEWBIE-Question] Processing Menus

2001-11-01 Thread Mike
MAIL From: $in{'email'}\n; print MAIL Subject: Link Request\n; print MAIL Someone requests a link addition\n; print MAIL Category: $in{'category'}\n; print MAIL URL: $in{'url'}\n; print MAIL Description: $in{'description'}\n; close(MAIL); Thanks again Mike Etienne Marcotte wrote: The CGI

Re: [NEWBIE-Question] Processing Menus

2001-11-01 Thread Mike
MAIL From: $in{'email'}\n; print MAIL Subject: Link Request\n; print MAIL Someone requests a link addition\n; print MAIL Category: $in{'category'}\n; print MAIL URL: $in{'url'}\n; print MAIL Description: $in{'description'}\n; close(MAIL); Thanks again Mike Etienne Marcotte wrote: The CGI

Re: me@me.com mail error

2001-11-01 Thread Mike
How is that? Etienne Marcotte [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... From: Mail Delivery Subsystem [EMAIL PROTECTED] Subject: Returned mail: Host unknown (Name server: me.com: no data known) To: [EMAIL PROTECTED] The

NET::FTP

2001-12-17 Thread Mike
Is there a way to use NET::FTP to only download files if they are current day? If not can it be done another way? Thanks! Mike -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: :FTP

2001-12-17 Thread Mike
THANKS! John Edwards wrote: Take a look at the Net::FTP docs. There's a function in the module called mdtm which returns the modified timestamp of the remote file. Query that, then download if it matches your criteria. HTH John -Original Message- From: Mike [mailto:[EMAIL

Get the first 10 characters.

2001-12-17 Thread Mike
How do I get the first 10 characters of a string? Mike -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

problem with Multipart module

2004-02-10 Thread mike
I am trying to use the Net::SMTP::Multipart to send attachments (word doc) and the encoding is getting mangled on non-linux machines If I send it to myself everything is fine (either external or via my mail server) this appears to the relevant part of the modules sub FileAttach { my $self =

Dufus question about form-fields and colour

2004-03-22 Thread mike
Does anyone know if it is possible to give a color attribute to form field? -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/ http://learn.perl.org/first-response

nested while loops using DBI

2004-03-22 Thread mike
I am trying to get the detail records to appear on a form underneath the header records with a db lookup Code $row=$dbh-prepare(SELECT contact_id,first_name,last_name,organisation FROM tb_contacts WHERE organisation ILIKE ?); my $cat1=%$category%; $row-bind_param(1,$cat1); $row-execute(); print

RE: nested while loops using DBI

2004-03-23 Thread mike
On Mon, 2004-03-22 at 18:04, Guay Jean-Sbastien wrote: Hello Mike, $row=$dbh-prepare(SELECT contact_id,first_name,last_name,organisation FROM tb_contacts WHERE organisation ILIKE ?); [...] while(($id,$first_name,$last_name,$organisation) = $row-fetchrow_array()) { [...] $row

Confused

2004-03-24 Thread mike
I am trying to get rid of a blank line at the start of a text file, and I dont understand why this does not work open(UPD1,tem);# this file exists my @update1=UPD1; foreach $update1(@update1){ $update1=~s/^(\n)//; $update1=~chomp; my @update2=split /#/,$update1;# this bit works But I still get

Question about cgi forms (slightly OT)

2004-03-25 Thread mike
I am developing a cgi/DBI app which is nearly finished I have this one question The scenario I have a cgi generated form on a web-page, it consists of several records defined by a DB lookup. When I do Search in the web-browser, is there any way to get it to search the values in the fileds of

Re: Confused

2004-03-25 Thread mike
On Wed, 2004-03-24 at 14:19, James Edward Gray II wrote: On Mar 24, 2004, at 7:59 AM, WC -Sx- Jones wrote: while(UPD1) { chomp; s/^\s+//; s/\s+$//; next unless length; There's probably not much reason to chomp() and s/\s+$//, since the later handles both. James Thanks for all

Re: Question about cgi forms (slightly OT)

2004-03-25 Thread mike
On Thu, 2004-03-25 at 13:18, WC -Sx- Jones wrote: mike wrote: When I do Search in the web-browser, is there any way to get it to search the values in the fileds of the form? Currently all the values show up, but they dont seem to appear to be in scope for searching Show some

passing a hash via cookie and dereferencing it

2010-01-19 Thread mike
-end_html; As you can see if you run these two scripts, the dereferencing step didn't give me back my hash %KK. I used the same synax to dereference $KK in both programs, but it didn't work for the passed one. Can anybody help? Thanks in advance. Mike -- To unsubscribe, e-mail: beginners-unsubscr

Introduction and Perl 5 References

2012-02-27 Thread Mike
Hello everyone. I just wanted to introduce myself to the list. Been following for a little while, first time posting. My name is Mike Dunaway and I am 25 years old. I was curious if there were any other members in the 804 area? I'm looking to meet some other programmers in my area as I only

Re: jsFiddle

2013-01-15 Thread Mike
On 1/15/2013 2:35 PM, Bill Stephenson wrote: Check out this web app: http://jsfiddle.net/ (Google jsfiddle.net example for examples of use) It would be nice to have something like that for fiddling with perl. I haven't really thought it through, but it might not take much to create

Re: parsing website

2013-02-26 Thread Mike
On 2/26/2013 1:46 PM, Noah wrote: Hi there, I want to parse text from a website. what are some good methods and modules to do this? Any tutorial links? Cheers WWW::Mechanize http://search.cpan.org/dist/WWW-Mechanize/lib/WWW/Mechanize.pm -- To unsubscribe, e-mail:

Re: CPAN unavailable

2014-05-21 Thread Mike
I would recommend using http://metacpan.org And for installing modules, you could try cpanminus: curl -L http://cpanmin.us | perl - --sudo App::cpanminu On 5/20/14, 8:22 PM, Yonghua Peng wrote: Hello, Do you know why these days cpan.org has been unavailable? I always got: 503 Service

Re: converting ip regex to iprange

2014-05-28 Thread Mike
Maybe this module here? http://search.cpan.org/~mrsam/Net-CIDR-0.11/CIDR.pm On 5/28/14, 3:08 AM, Agnello George wrote: Hi I have about 300 + ip regex in my apache file like this 11\.45\.3[2-9]\..*$ ^11\.45\.4[0-9]\..*$ ^11\.45\.5[0-9]\..*$ I have to convert like this into CIDR .

Grabbing HTML fields, return them as hash

2014-06-09 Thread Mike
Hello everyone. Can anyone point me in the direction of a module that will allow me to grab HTML fields and return them as a hash? Thanks. -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/

Re: script to match a valid email id

2014-07-10 Thread Mike
That's a lot of regex. On 7/10/14, 2:25 PM, Ron Bergin wrote: Sunita Pradhan wrote: I do not want to use Cpan modules . -Sunita What do you have against using a cpan module? If you don't want to use the module, then why not simply copy/use the regex that it uses to do the validation?

Re: Best way to install perl modules

2014-10-04 Thread Mike
Use cpanminus. To install: sudo curl -L http://cpanmin.us | perl - --sudo App::cpanminus To use: sudo cpanm module to install Here's the official documentation: http://search.cpan.org/~miyagawa/App-cpanminus-1.7012/lib/App/cpanminus.pm On 10/4/14, 8:32 PM, Benjamin Fernandis wrote: Hi,

Re: Best way to install perl modules

2014-10-06 Thread Mike
running: aptitude install build-essential --Sam On 10/04/2014 11:39 PM, Benjamin Fernandis wrote: Hi Mike, Thanks for your kind response. I tried cpanm instead of cpan, but many times, it does not install require

IO::Socket

2014-12-29 Thread Mike
Can anyone point me in the direction of more thorough documentation for the IO::Socket module? Seems like the documentation on perl.org is pretty limited. At least, it doesn't feel very thorough to me. http://perldoc.perl.org/IO/Socket.html For example, what exactly does timeout affect? This

Re: Script for auto conf

2014-12-29 Thread Mike
I have a feeling this could easier be accomplished with bash. On 12/29/14 9:47 PM, Alan Glait wrote: Hi ! I have the Idea to make a perl script (better than in bash) to make some configuration on linux. I think to have some files like param.txt with some lines like: param_one = ZZZ XX

Re: Parsing multi column files

2015-01-18 Thread Mike
Thanks for quick lesson and pro-tips. I'll be sure to implement some of these. In case you were wondering, I am indeed using strict and warnings. diagnostics, too. Thanks again. On 1/18/15 9:05 PM, Brandon McCaig wrote: Mike: On Sun, Jan 18, 2015 at 07:00:05PM -0500, Mike wrote: So I've

Re: Parsing multi column files

2015-01-18 Thread Mike
Thanks. I'll give this a shot. On 1/18/15 7:44 PM, Brandon McCaig wrote: On Sun, Jan 18, 2015 at 07:24:21PM -0500, Shawn H Corey wrote: You would need an array for each column: my $MAX = 10; my @first = (); my @second = (); my @third = (); sub get_columns { my $file = shift @_;

Re: Using regular expressions to populate a variable?

2015-01-18 Thread Mike
. On 1/18/15 11:49 AM, Mike wrote: Hey everyone, I'm trying to find information on how I can use regular expressions to populate a variable. I want to pull text between one set of characters and another set of characters and use that to populate my variable. Can anyone point me in the right

Using regular expressions to populate a variable?

2015-01-18 Thread Mike
Hey everyone, I'm trying to find information on how I can use regular expressions to populate a variable. I want to pull text between one set of characters and another set of characters and use that to populate my variable. Can anyone point me in the right direction? Thanks. -- To

Re: Using regular expressions to populate a variable?

2015-01-18 Thread Mike
Thanks. This worked. On 1/18/15 12:28 PM, Jim Gibson wrote: On Jan 18, 2015, at 9:03 AM, Mike ekimduna...@gmail.com wrote: I was able to find match extraction in the perldoc. Here is a snippet of what I have. my $insult = ( $mech-text =~ m/Insulter\ (.*)\ Taken/ ); print $insult\n

Parsing multi column files

2015-01-18 Thread Mike
So I've got a text file in a multi column format (three columns), each column is separated by a single space. Here is a snippet for reference: artless base-court apple-john bawdy bat-fowling baggage beslubbering beef-witted barnacle I want to be able to randomly select a word from the first

Submitting a form with Mechanize -- Can't find form

2015-01-31 Thread Mike
Hey everyone, I'm trying to submit a form with WWW::Mechanize to post a new thread on a forum from the command line. The forum also requires an image to be uploaded with it. Anyway...here is my snippet: $mech-submit_form( form_name = 'post', fields = { body

Best practice for executing system commands?

2015-01-24 Thread Mike
Which is generally considered the best practice way of executing system commands from within a Perl program? Should I use backticks or qx//, system(), or exec()? Or is there no best way and it's just a matter of what you want to return? -- To unsubscribe, e-mail:

Re: sftp code to use

2018-10-28 Thread Mike
One way to unzip with Perl is this method: use warnings; use strict; use Archive::Zip qw( :ERROR_CODES :CONSTANTS ); my $zipfile = 'zipped.zip'; my $zip = Archive::Zip->new(); die "Error reading $zipfile:$!" unless $zip->read($zipfile) == AZ_OK; $zip->extractMember($zipfile) for

PAUSE

2019-06-30 Thread Mike
. Mike -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/

Re: PAUSE

2019-07-01 Thread Mike
I never did receive the e-mails to my AT e-mail, but a person in Demmark, or someplace like that, gave me some personal attention and I believe all is good now. Thanks so much to Shlomi, Andreas and everybody else. I first applied to PAUSE on 6/9/2019. Mike On 6/30/2019 7:07 PM, pengyong

Re: Google Sheets API Data Structure

2019-08-16 Thread Mike
Please state the exact module name. Is it this one: https://metacpan.org/pod/Net::Google::Spreadsheets::V4 My guess is no. Mike On 8/15/2019 10:18 AM, James Kerwin wrote: Hi All, I managed to get the Google Sheets API Perl module working. I'm currently investigating a data structure

Re: Problem executing command via ssh

2019-08-24 Thread Mike
Wow, a complicated question that I know very little about.  But since nobody else has jumped in, I will show my ignorance by suggesting this: Perhaps change $command to @command. or use something like local $/; These beginners questions are getting pretty complicated :-) Mike On 8/23/2019

Geo::WebService::Elevation::USGS

2019-08-26 Thread Mike
error: 500 Can't connect to nationalmap.gov:443 (Bad address) at .pl line 12. If you get either to run correctly, see if you have Geo::WebService in your environment variables. Thank you. Mike -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beg

Re: Geo::WebService::Elevation::USGS

2019-08-27 Thread Mike
gt; { verify_hostname => 0, } ); $ua->env_proxy; $ua->agent("Mozilla/5.0 (Windows)"); my $response = $ua->get($url); if ($response->is_success) { print $response->content; } else {    die $response->status_line; } print "All done.\n\n"; __END__ Mik

Re: Geo::WebService::Elevation::USGS

2019-08-30 Thread Mike
Yes.  Both of these work fine: my $test = get('http://google.com/') or die 'Unable to get page'; # Works my $test = get('https://google.com/') or die 'Unable to get page'; # Works On 8/29/2019 9:33 PM, Olivier wrote: Mike writes: Sorry Mike, but I have hard time to get a clear picture

Re: Geo::WebService::Elevation::USGS

2019-09-03 Thread Mike
'Unable to get page'; # Does not work Mike On 9/2/2019 12:31 AM, Olivier wrote: Mike writes: Yes.  Both of these work fine: my $test = get('http://google.com/') or die 'Unable to get page'; # Works my $test = get('https://google.com/') or die 'Unable to get page'; # Works Good, do we know two

Re: Geo::WebService::Elevation::USGS

2019-08-29 Thread Mike
ds.blm.gov/default.aspx') or die 'Unable to get page'; # Does not work print "\nAll done.\n\n\$test = $test\n\n"; __END__ On 8/28/2019 10:00 PM, Olivier wrote: Mike writes: Thanks for the response. Yeah, I don't understand why https://nationalmap.gov/epqs/pqs.php won't open in a b

Re: Geo::WebService::Elevation::USGS

2019-08-28 Thread Mike
arc-second     583.54     Feet   When I go to: https://nationalmap.gov/epqs/pqs.php?x=-90.76983=38.72360=feet=xml it gives:       3DEP 1/3 arc-second     583.54     Feet   So that works. Mike On 8/26/2019 10:26 PM, Uri Guttman wrote: have you tried to just telnet to those hosts

Re: Geo::WebService::Elevation::USGS

2019-08-29 Thread Mike
In my Firefox it is set at: "Use system proxy settings" I turned it off briefly, but didn't really see any changes. I do not implement a proxy in LWP::Simple. I don't think I use a system Proxy: http://www.mflan.com/temp/proxy.jpg Mike On 8/29/2019 5:52 AM, Olivier wrote: A

Re: Geo::WebService::Elevation::USGS

2019-08-29 Thread Mike
UserAgent uses the FireFox identity. I know I can use Mechanize and really dive into this. And I might do that someday.  But for the moment I'm thinking this is unlikely to get fixed in the next week. Good thing I don't need this. Mike On 8/29/2019 5:35 AM, Olivier wrote: I don't see why you

Re: Geo::WebService::Elevation::USGS

2019-08-29 Thread Mike
I was thinking it might give the fill in form that you get when you go here: https://nationalmap.gov/epqs/ I think you are right.  It is acting as intended when visited with a browser. Mike On 8/28/2019 10:00 PM, Olivier wrote: Mike writes: Thanks for the response. Yeah, I don't

Re: Geo::WebService::Elevation::USGS

2019-08-28 Thread Mike
that will fix it, but I am trying just about everything. I still can't figure out why it works on some URL's, and not others.  It's probably going to take me a long time to figure this out. Mike On 8/28/2019 6:26 PM, $Bill wrote: This seems fine on my Win10: use strict; use warnings; use LWP

Re: Hi Folks : I'm trying to create a regular expression for finding a # wishing a dataset for only a number that is a multiple of 5

2019-09-08 Thread Mike
It's probably best if you write a short script that reads a __DATA__ section of data. Then tell us what it does and what you expected it to do. Off hand I don't see anything wrong with your regex, but I don't know what you expect it to do. Mike On 9/8/2019 4:34 PM, Jim Gibson wrote

regular expression

2019-09-08 Thread Mike
You are not doing anything with $t to test whether it works.  Also you are not telling us what data you might test it with. Mike On 9/8/2019 6:41 PM, Jim Gibson wrote: On Sep 8, 2019, at 3:39 PM, Mike wrote: I expect it to return a positive value if $t contains a number anywhere within

Re: symlink to "pack"

2019-09-07 Thread Mike
htm I am on Strawberry Perl, so I can't really help debug this. Mike On 9/7/2019 3:25 PM, Jorge Almeida wrote: Sorry about the title, it's the best I can do... #!/usr/bin/perl use strict; use warnings; my $num=12; my $target=pack('n', $num); symlink($target, "foo") || die $!; It die

  1   2   3   4   5   6   7   8   9   >