Re: XML Simple + parsing inner loop elements + help

2015-12-08 Thread shawn wilson
tl;dr I'm not answering your specific question here. On Dec 8, 2015 1:26 AM, "perl kamal" wrote: > > Hi, > > I am trying to parse the inner loop elements of the attached input xml elements. Just fyi, I've found it easier to use xslt as an etl preprocessor to perl. I'm not

Re: Perl executable problem...

2015-11-18 Thread shawn wilson
In that case, Install cygwin (idk if you'll have to select gcc or it's default - either way that's the easiest way I know of to get it on windows). On Mon, Nov 16, 2015 at 3:52 AM, Rui Fernandes wrote: > Good morning Kevin, > > I've installed par as you said. It seeme to

Fwd: passwords in Perl

2015-11-06 Thread shawn wilson
This is a pretty teachable article which is somewhat related to login pages and secure content (just made me think of this discussion when I saw it so figured I'd share - also is about Slack which lots of y'all probably use):

Re: UnixDate export problem

2015-11-06 Thread shawn wilson
Try UnixDate On Fri, Nov 6, 2015 at 12:20 PM, Karl Hakmiller wrote: > ~/perlstuff$ perl hopdelta.plx > "UxixDate" is not exported by the Date::Manip module > Can't continue after import errors at hopdelta.plx line 9. > BEGIN failed--compilation aborted at hopdelta.plx line 9. >

Re: passwords in Perl

2015-10-27 Thread shawn wilson
On Oct 27, 2015 1:45 AM, "Paul.G" wrote: > > Just wondering, what are peoples thoughts on using password authentication in perl. What tools do people use to secure the password or do you just restrict access to the script file so the password cannot be viewed etc. > Don't

Re: passwords in Perl

2015-10-27 Thread shawn wilson
<kentfred...@gmail.com> wrote: > On 27 October 2015 at 20:25, shawn wilson <ag4ve...@gmail.com> wrote: >> do to manage policies and prevent users from using weak passwords and >> emulate them. > > > And if you want some examples on how *NOT* to restrict passwor

Re: passwords in Perl

2015-10-27 Thread shawn wilson
On Tue, Oct 27, 2015 at 1:15 PM, Shawn H Corey <shawnhco...@gmail.com> wrote: > On Tue, 27 Oct 2015 12:25:38 -0400 > shawn wilson <ag4ve...@gmail.com> wrote: > >> Oh, and this is one place where you *don't* give lots of details of >> what went wrong. Don't s

Re: passwords in Perl

2015-10-27 Thread shawn wilson
On Tue, Oct 27, 2015 at 8:19 PM, Kent Fredric <kentfred...@gmail.com> wrote: > On 28 October 2015 at 06:26, shawn wilson <ag4ve...@gmail.com> wrote: >> time*tries*exp is probably more like what you want, and do it before >> you print the error, but yeah > > &

Re: Need explanation of code

2015-04-12 Thread shawn wilson
On Apr 12, 2015 12:23 AM, SSC_perl p...@surfshopcart.com wrote: Could someone please explain the difference between: %{$self-{'DATA'}} = () } The hashref of key DATA equals an empty list. The trailing bracket is the end of the else block. $self is also probably blessed (an object).

Re: Need explanation of code

2015-04-12 Thread shawn wilson
On Apr 12, 2015 8:06 AM, Shawn H Corey shawnhco...@gmail.com wrote: On Sat, 11 Apr 2015 21:20:22 -0700 SSC_perl p...@surfshopcart.com wrote: Could someone please explain the difference between: %{$self-{'DATA'}} = () } %{ $self-{'DATA'} } = (); and $self-{'DATA'} = {}

Re: use perl format data

2015-02-05 Thread shawn wilson
On Feb 5, 2015 4:06 AM, Wang, Zeng-Sheng (TS-GSD-China-ZZ) zengsheng.w...@hp.com wrote: a b c x y z 1 2 3 d e f q w e n 3 4 5 j p ka s d 8 9 2 1 how to use $a, $b and $c product $x? Along with what was

Re: Net:SSH2 v/s Expect

2014-12-01 Thread shawn wilson
On Dec 1, 2014 7:02 AM, Priyal Jain jpri...@juniper.net wrote: Thanks, and on the basis of performance like speed and robustness which is better?? So I've never had the need for either - run local or remote or managed (puppet/chef or the perl solution I can't think off hand). And for

Re: puppet-like Perl application

2014-11-20 Thread shawn wilson
I'll second Rex - it isn't as high level as Chef/Puppet and you're not going to find the recipes (or w/e puppet calls them). But, Rex has every type of communication and transfer you'd want and IDK it'd be very hard to write a Rex::Chef.. (I also haven't looked at it in 2 years since we won't

Re: References

2014-05-14 Thread shawn wilson
On Wed, May 14, 2014 at 1:31 AM, Mike Dunaway ekimduna...@gmail.com wrote: What's a good use of references? When is it ideal to use them? Why would you want to use them? Maybe a better question is when *not* to use them. I try to keep things that don't need to be passed around or have multi

Re: regular expression

2014-05-06 Thread shawn wilson
On Wed, May 7, 2014 at 1:19 AM, Danny Wong (dannwong) dannw...@cisco.com wrote: Hi Guys, I have the following strings. my $str1=^Modifications made by Danny Wong (danwong) on 2014/05/06 18:27:48 from database brms; #$str1=^Modifications made by danwong on 2014/05/06 18:27:48 from

NYTProf

2014-04-02 Thread shawn wilson
For some reason, I'm not getting any output from NYTProf: devvm07 ~/dirt-tests # cat /tmp/prof.out cat: /tmp/prof.out: No such file or directory devvm07 ~/dirt-tests # export 21 | egrep 'PERL|NYT' declare -x NYTPROF=file=/tmp/prof.out declare -x PERLOPT=-d:NYTProf devvm07 ~/dirt-tests # perl -e

Re: Perl event programming book

2014-03-27 Thread shawn wilson
No books per se. And this thread is pretty old. However, some of the links still work and you should be able to find the rest by googling the titles. http://www.perlmonks.org/?node_id=281219 On Thu, Mar 27, 2014 at 10:33 AM, Yonghua Peng sys...@mail2000.us wrote: Hello, Is there a book

Re: arbitrary sort

2014-03-26 Thread shawn wilson
} if $pre-{$a} $pre-{$b}; return -1 if $pre-{$a}; return +1 if $pre-{$b}; return $a cmp $b; } @$data; } On Tue, Mar 25, 2014 at 11:53 AM, Uri Guttman u...@stemsystems.com wrote: On 03/25/2014 11:41 AM, Jim Gibson wrote: On Mar 25, 2014, at 7:56 AM, shawn wilson

arbitrary sort

2014-03-25 Thread shawn wilson
i want to sort an array for certain key words first and then alphabetically. my @foo = qw/foo bar baz first second third/; foreach my $i (sort {$a cmp $b} @foo) { print $i\n; } How do I make 'first', 'second', and 'third' come before the rest? (I'm actually dealing with a hash) -- To

Re: arbitrary sort

2014-03-25 Thread shawn wilson
25, 2014 at 10:45 AM, Shawn H Corey shawnhco...@gmail.com wrote: On Tue, 25 Mar 2014 09:55:25 -0400 shawn wilson ag4ve...@gmail.com wrote: i want to sort an array for certain key words first and then alphabetically. my @foo = qw/foo bar baz first second third/; foreach my $i (sort {$a cmp

Re: Re[2]: Where's this documented?

2014-03-19 Thread shawn wilson
from shawn wilson ag4ve...@gmail.com: On Tue, Mar 18, 2014 at 11:32 PM, John W. Krahn jwkr...@shaw.ca wrote: Shaji Kalidasan wrote: or stat() or lstat() I don't remember seeing that reusing i?stat would not duplicate the stat call...? Oh, I guess I was thinking that using the file name

Re: Where's this documented?

2014-03-18 Thread shawn wilson
On Tue, Mar 18, 2014 at 11:32 PM, John W. Krahn jwkr...@shaw.ca wrote: Shaji Kalidasan wrote: or stat() or lstat() I don't remember seeing that reusing i?stat would not duplicate the stat call...? -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail:

Where's this documented?

2014-03-17 Thread shawn wilson
From Archive::Tar::File - what's '_' and where is it documented? sub _filetype { my $self = shift; my $file = shift; return unless defined $file; return SYMLINK if (-l $file); # Symlink return FILE if (-f _); # Plain file return DIR if (-d _);

Re: Where's this documented?

2014-03-17 Thread shawn wilson
Thank y'all. That's weird to read, but it makes sense easy enough. On Mon, Mar 17, 2014 at 7:10 AM, Brian Fraser frase...@gmail.com wrote: On Mon, Mar 17, 2014 at 10:05 AM, shawn wilson ag4ve...@gmail.com wrote: From Archive::Tar::File - what's '_' and where is it documented? sub _filetype

Re: regexp puzzle

2014-03-07 Thread shawn wilson
([^]+) \(([0-9]+).*\) ([a-z]+) On Mar 8, 2014 1:07 AM, Bill McCormick wpmccorm...@gmail.com wrote: I have the following string I want to extract from: my $str = foo (3 bar): baz; and I want to to extract to end up with $p1 = foo; $p2 = 3; $p3 = baz; the complication is that the

Re: regexp puzzle

2014-03-07 Thread shawn wilson
On Mar 8, 2014 1:41 AM, shawn wilson ag4ve...@gmail.com wrote: Oh and per optional, just do (?:\([0-9]+).*\)? You should probably use do my @match = $str =~ / ([^]+) (?:\([0-9]+).*\)? ([a-z]+)/; my ($a, $b, $c) = (scalar(@match) == 3 ? @match : $match[0], undef, $match[1]); ([^]+) \(([0-9

Re: return just a match from an array without changing the array

2014-03-04 Thread shawn wilson
, shawn wilson ag4ve...@gmail.com wrote: So, when I do this: my $src = (grep {/.*(ARIN|APNIC).*(\n)?/; $1} @ret)[0]; I get a full line and not just the capture: # ARIN WHOIS data and services are subject to the Terms of Use When I do this: my $src = (grep {s/.*(ARIN|APNIC).*(\n)?/$1

Re: return just a match from an array without changing the array

2014-03-04 Thread shawn wilson
On Mar 4, 2014 9:46 AM, Shawn H Corey shawnhco...@gmail.com wrote: On Tue, 4 Mar 2014 09:24:53 -0500 shawn wilson ag4ve...@gmail.com wrote: my $src = (map {s/.*(ARIN|APNIC).*(?:\n)?/$1/r} @ret)[0]; You do realize this is process the whole array and then throwing out all but the first

return just a match from an array without changing the array

2014-03-03 Thread shawn wilson
So, when I do this: my $src = (grep {/.*(ARIN|APNIC).*(\n)?/; $1} @ret)[0]; I get a full line and not just the capture: # ARIN WHOIS data and services are subject to the Terms of Use When I do this: my $src = (grep {s/.*(ARIN|APNIC).*(\n)?/$1/} @ret)[0]; I get just the match but it also

Re: regex to get version from file name

2014-02-23 Thread shawn wilson
Use LWP to get web data - not lynx and the like unless you can't help it. I prefer using Web::Scraper to parse html but either way it's probably best not to use a regex (see SO and similar for discussions on the like). On Feb 23, 2014 8:13 AM, Wernher Eksteen crypt...@gmail.com wrote: Hi,

Re: time based test

2014-02-20 Thread shawn wilson
, 14 Feb 2014 16:21:52 -0500 shawn wilson ag4ve...@gmail.com wrote: What I want is to be able to make a program /think/ that it's like a week in the future without messing with the system time at all. So something that overrides gmtime and localtime and the like with some starting point would

time based test

2014-02-14 Thread shawn wilson
What I want is to be able to make a program /think/ that it's like a week in the future without messing with the system time at all. So something that overrides gmtime and localtime and the like with some starting point would be awesome. Anything like that? -- To unsubscribe, e-mail:

Re: time based test

2014-02-14 Thread shawn wilson
On Fri, Feb 14, 2014 at 5:21 PM, Andy Bach afb...@gmail.com wrote: On Fri, Feb 14, 2014 at 3:21 PM, shawn wilson ag4ve...@gmail.com wrote: What I want is to be able to make a program /think/ that it's like a week in the future Not sure ... not understanding this question - which part

Not mapping into a hash

2014-02-13 Thread shawn wilson
I know I'm overlooking something real simple here but I just don't see it: The test: $ipt-_list_set({ 'name' = test, 'direction' = [qw/src dst/], 'useipset' = 1, }), ['-m set --match-set test src,dst'], Source and destination list, Output: # Failed test

Re: Not mapping into a hash

2014-02-13 Thread shawn wilson
...@pjcj.net wrote: On Thu, Feb 13, 2014 at 06:04:40AM -0500, shawn wilson wrote: I know I'm overlooking something real simple here but I just don't see it: And the method ('HERE' marking the branch that is having issues): Are you sure? I think you might not be getting that far. sub _list_set

Test::More is_deeply failed data

2014-02-11 Thread shawn wilson
Is there a way to see the data difference when is_deeply fails? proove -d doesn't give me the structure that fails. I end up 'print STDERR one . Dumper($foo); print STDERR 'two . Dumper($bar);' which just doesn't seem like the right thing to do to figure out why a test is failing? -- To

Re: Test::More is_deeply failed data

2014-02-11 Thread shawn wilson
Test::Differences looks like what I want. Also he documents gracefully falling back to is_deeply. I see no issue requiring it but the alternative is cool. On Feb 11, 2014 2:02 PM, Shlomi Fish shlo...@shlomifish.org wrote: Hi Shawn, On Tue, 11 Feb 2014 13:17:15 -0500 shawn wilson ag4ve

constant in object

2014-02-10 Thread shawn wilson
Why doesn't $foo show up in the object? Ways around it are obvious - just have a helper method: sub foo {return [qw/one two three/]} but I don't understand why I don't have access to the variable within the same package? use strict; use warnings; use Data::Dumper; my $t = T-new(); print

Re: constant in object

2014-02-10 Thread shawn wilson
On Mon, Feb 10, 2014 at 11:50 PM, Uri Guttman u...@stemsystems.com wrote: On 02/10/2014 11:35 PM, shawn wilson wrote: my $foo = [qw/one two three/]; that assignment happens later. $foo isn't set when new is called yet. Ah, of course - thanks. sub new { my ($proto) = @_; my

Re: constant in object

2014-02-10 Thread shawn wilson
On Tue, Feb 11, 2014 at 12:42 AM, Uri Guttman u...@stemsystems.com wrote: On 02/11/2014 12:13 AM, shawn wilson wrote: On Mon, Feb 10, 2014 at 11:50 PM, Uri Guttman u...@stemsystems.com wrote: sub new { my ($proto) = @_; my $class = ref($proto) || $proto; don't do that style

Re: constant in object

2014-02-10 Thread shawn wilson
why not add more code that doesn't do anything useful? code is not telling the computer what to do. code is for telling the reader of the code what your logical decisions are. On Tue, Feb 11, 2014 at 1:13 AM, John SJ Anderson geneh...@genehack.org wrote: TL;DR - if you can't offer a

Re: list to hash puzzle

2014-02-09 Thread shawn wilson
Ugh, best document the hell out of that. Split with parameters, splitting a tr - I see that everywhere... On Feb 9, 2014 6:45 PM, Bill McCormick wpmccorm...@gmail.com wrote: On 2/9/2014 10:48 AM, Bill McCormick wrote: Trying to map the array list into a hash, but loose the double quotes

Re: HTML::TokeParser munging characters

2013-12-28 Thread Shawn Wilson
The parser has done what its supposed to. IDK you can alter the encoding in it. Maybe you can and that's what you're looking for (encoding or character set). I'd first try binmode UTF-8 but you'll probably just end up handling this with a regex. Lars Noodén lars.noo...@gmail.com wrote: If

Re: Regrex Question

2013-11-25 Thread shawn wilson
Take it out of the loop and add /s if it could span lines. On Mon, Nov 25, 2013 at 2:44 PM, Mike Blezien mick...@frontiernet.net wrote: Thank you for your and the other list members suggestions, gives me a good place to start. Mike(mickalo)Blezien

Recursive structure trace

2013-11-10 Thread shawn wilson
I'm having a bit of trouble writing a trace array for a structure traversal function. Before someone points out Data::Walker and the like, here is my limitation: this is for a script to generate iptables / ipset save files - it needs to run on machines with perl 5.10+ without needing anything

Re: help on file search

2013-11-10 Thread Shawn Wilson
File::Find also see find2perl Rahim Fakir rahim.g.fa...@gmail.com wrote: Iam looking for a module or a script that when running the script.pl, I have to write the name of a file and it searches in my C: drive. Best regards Ray -- *Nome: Rahim Gulamo Nabi Mussa Fakir* *Morada:Rua

Re: Recursive structure trace

2013-11-10 Thread shawn wilson
I think this is more along the lines of what i should have (but i still don't have it working): On Sun, Nov 10, 2013 at 6:10 PM, shawn wilson ag4ve...@gmail.com wrote: I'm having a bit of trouble writing a trace array for a structure traversal function. Before someone points out Data

IPC::Cmd pipe array

2013-10-29 Thread shawn wilson
This is cross posted from perlmonks (http://perlmonks.org/?node_id=1060079). The end goal is to echo an array of iptables save data into iptables-restore. I am getting output via IPC::Cmd but not via the redirect (which is fine) however, the pipe also doesn't seem to be working. Any ideas?

Re: I'm doing something stupid

2013-10-04 Thread shawn wilson
); print blah . $ereg-[0][0] . \n; # Each match foreach my $i (0 .. $enum) { substr($line, $ereg-[0][$enum], 0, $color); substr($line, $ereg-[1][$enum], 0, '\e[0m'); } } print $line On Thu, Oct 3, 2013 at 8:24 PM, Rob Dixon rob.di...@gmx.com wrote: shawn wilson ag4ve...@gmail.com

Re: I'm doing something stupid

2013-10-04 Thread shawn wilson
at 11:46 AM, Shawn H Corey shawnhco...@gmail.com wrote: On Fri, 4 Oct 2013 11:40:48 -0400 shawn wilson ag4ve...@gmail.com wrote: foreach my $ereg (@$match) { my $enum = ($#{$ereg-[0]} = $#{$ereg-[1]} ? $#{$ereg-[0]} : $#{$ereg-[1]}); print ereg . Dumper(@$ereg); print blah

I'm doing something stupid

2013-10-03 Thread shawn wilson
From position 0 to 7 should be whatever GREP_COLOR export is defined as. There might be issues with how I'm doing that but my main issue (I think) is how I'm looping (and/or how I'm using substr). #!/usr/bin/perl use strict; use warnings; use Data::Dumper; my $line = 'foo bar baz ball'; my

Re: Social network map

2013-07-15 Thread shawn wilson
On Mon, Jul 15, 2013 at 8:02 AM, Feng He fen...@nsbeta.info wrote: On 2013-7-15 19:30, htchd...@live.com wrote: How to draw a social network map in Perl? what's a social network map? Yeah, this sounds like it could be interesting, but we're only guessing at what you're trying to do from

Re: grab pattern from start and end block

2013-07-13 Thread shawn wilson
There's enough code here that I'm not even going to try. However, your data looks almost like json (minus the quoting). If this is the case, you'll probably want to build up an array of hashes and use JSON::XS. On Jul 13, 2013 6:16 AM, Rob Dixon rob.di...@gmx.com wrote: On 12/07/2013 12:44,

Re: downloading file from website

2013-07-13 Thread shawn wilson
On Sat, Jul 13, 2013 at 8:02 AM, Shawn H Corey shawnhco...@gmail.com wrote: On Sat, 13 Jul 2013 01:01:22 -0400 shawn wilson ag4ve...@gmail.com wrote: The cool kids (me) would look to mojo for this type of thing. Link? https://metacpan.org/module/SRI/Mojolicious-2.76/lib/Mojo/UserAgent

Re: Hello

2013-07-12 Thread shawn wilson
Easiest: my $file = /etc/resolv.conf; open(my $fh, , $file) or die Can not open $file: . $!; my @dns; while ($fh) { next unless /nameserver +([0-9\.]+)/; push @dns, $1; } On Fri, Jul 12, 2013 at 2:31 AM, Frank Vino vinofra...@gmail.com wrote: Could you please let me know the perl script how

Re: Hello

2013-07-12 Thread shawn wilson
I should've known it was somewhere in Net::DNS. Though it took me 2 minutes to think and write that. Good call. On Jul 12, 2013 9:20 AM, James Alton jamesalton...@gmail.com wrote: use feature say; use Net::DNS; foreach (Net::DNS::Resolver-new-nameservers) { say; } James Alton 801-388-7497

Re: downloading file from website

2013-07-12 Thread shawn wilson
On Jul 12, 2013 9:30 PM, Shawn H Corey shawnhco...@gmail.com wrote: On Sat, 13 Jul 2013 01:14:44 + Danny Wong (dannwong) dannw...@cisco.com wrote: HI Perl GURU's, Is there a way to download a zip file from a web page and have the script simulate pushing the accept button on

Re: Perl file and STDERR

2013-07-10 Thread shawn wilson
On Jul 10, 2013 2:01 AM, jitendra B jiten...@gmail.com wrote: Thank you very much Andy, Nathan, Shawn for your kind help. I am new to the perl. Why auto-flush is needed here (STDERR autoflushes)? Probably for consistency with autoflush being enabled for STDOUT, it's also on with STDERR. It's

gauging events

2013-07-10 Thread shawn wilson
I'm trying to figure out how to group things that occure more frequently in a rolling time frame (given a minimum event group). I'd like some type of ranking and the medium time. So, for instance, if I had something like this: $time = [ 10:00, 10:01, 10:15, 10:10, 10:25,

Re: gauging events

2013-07-10 Thread shawn wilson
Gibson jimsgib...@gmail.com wrote: On Jul 10, 2013, at 5:26 AM, shawn wilson wrote: I'm trying to figure out how to group things that occure more frequently in a rolling time frame (given a minimum event group). I'd like some type of ranking and the medium time. So, for instance, if I had

Re: printing content of a pipe

2013-06-28 Thread shawn wilson
On Jun 28, 2013 9:24 AM, Shawn H Corey shawnhco...@gmail.com wrote: On Fri, 28 Jun 2013 11:57:24 +0100 Rob Dixon rob.di...@gmx.com wrote: On 28/06/2013 02:32, Uri Guttman wrote: you don't need ever to set $| on stderr as it is not buffered like stdout is. and you rarely need to

Re: last

2013-06-27 Thread shawn wilson
On Fri, Jun 28, 2013 at 12:04 AM, Charles DeRykus dery...@gmail.com wrote: On Thu, Jun 27, 2013 at 1:31 PM, Dr.Ruud rvtol+use...@isolution.nl wrote: On 27/06/2013 22:01, Shawn H Corey wrote: On Thu, 27 Jun 2013 21:53:46 +0200 Dr.Ruud rvtol+use...@isolution.nl wrote: See also 'Statement

Re: last

2013-06-25 Thread shawn wilson
On Jun 25, 2013 3:11 AM, lee l...@yun.yagibdah.de wrote: shawn wilson ag4ve...@gmail.com writes: Lee, can you provide an example of another programming language that implements this or a thesis that describes this problem in more depth? I'm not sure what you mean --- other programming

Re: last

2013-06-24 Thread shawn wilson
Lee, can you provide an example of another programming language that implements this or a thesis that describes this problem in more depth? This is sort of a p5p question but the above might cut this off at the knees (or better show a gap that needs to be filled).

Re: how to make perl program run continue when i press control+s to pause screen output

2013-06-06 Thread shawn wilson
If it's a daemon, use something like start-stop-daemon or use something like Net::Daemon (search cpan). I prefer the former as I find it easier to debug but do have my programs create a pidfile vs having start-stop-daemon do it. If you just want it put in the background sometimes but generally

Re: how to make perl program run continue when i press control+s to pause screen output

2013-06-06 Thread shawn wilson
I seriously think you've found a feature and you don't know what it is and just want to use it because it's there. Please read this: http://en.wikipedia.org/wiki/Software_flow_control After you're done, I recommend this in your shell rc: stty -ixon On Thu, Jun 6, 2013 at 12:49 PM, Robert

Re: Next subnet

2013-05-27 Thread shawn wilson
On May 27, 2013 1:02 PM, Dr.Ruud rvtol+use...@isolution.nl wrote: On 26/05/2013 14:40, shawn wilson wrote: Thank y'all, I got to where I want to be: https://github.com/ag4ve/geocidr ... or grep { ! m%[0-9\.\/]+% } @{$opts-{ip}} or scalar(@{$opts-{ip}}) 1 The '+' in the regexp

Re: make and Makefile.PL

2013-05-27 Thread shawn wilson
Makefile.PL creates a Makefile - have you gotten that far? What's the problem? On May 27, 2013 4:23 PM, Rahim Fakir rahim.g.fa...@gmail.com wrote: I have download Make for windows 7, but I have problems, with make nmake, and Makefile.PL, i don't know how to install them.

Re: Next subnet

2013-05-26 Thread shawn wilson
Thank y'all, I got to where I want to be: https://github.com/ag4ve/geocidr On Sun, May 26, 2013 at 8:06 AM, Michael Rasmussen mich...@jamhome.us wrote: On Fri, May 24, 2013 at 03:18:35PM -0400, shawn wilson wrote: How do I find the next subnet? This should print 192.168.1.0 the second time

Next subnet

2013-05-24 Thread shawn wilson
How do I find the next subnet? This should print 192.168.1.0 the second time - it errors: #!/usr/bin/env perl use strict; use warnings; use Net::IP; my $ip = Net::IP-new('192.168.0.0/24'); print Start ip [ . $ip-ip . ]\n; print start mask [ . $ip-prefixlen . ]\n; $ip-set($ip-last_ip); $ip++;

Re: help with some code

2013-05-23 Thread shawn wilson
On May 23, 2013 3:47 PM, Rahim Fakir rahim.g.fa...@gmail.com wrote: Iam practicing from start and I have a problem with this code: This is the comment of the console, i coulnd't give a round to it, pls help... Can't locate Glib.pm in @INC @INC contains: C:/Dwimperl/perl/site/lib

module versions

2013-05-15 Thread shawn wilson
I asked this in #perl-help and was told that by the time perl checked the version, the module was already loaded - is there a way to check the version without completely loading the module so that when one failed, I could move on to another module of the same name whose version might succeed? I

Re: module versions

2013-05-15 Thread shawn wilson
On Wed, May 15, 2013 at 3:28 PM, Octavian Rasnita orasn...@gmail.com wrote: From: shawn wilson ag4ve...@gmail.com I asked this in #perl-help and was told that by the time perl checked the version, the module was already loaded - is there a way to check the version without completely loading

Re: module versions

2013-05-15 Thread shawn wilson
On Wed, May 15, 2013 at 4:13 PM, Ron Bergin r...@i.frys.com wrote: shawn wilson wrote: I asked this in #perl-help and was told that by the time perl checked the version, the module was already loaded - is there a way to check the version without completely loading the module so that when one

Re: Perl scope like cscope

2013-04-26 Thread shawn wilson
Yeah, I was going to suggest ctags. If you're using vim there's no good plugin for ctags (you'll try and I couldn't blame you but when vim starts blowing up make that the first plugin you disable). On Apr 26, 2013 4:13 AM, Luca Ferrari fluca1...@infinito.it wrote: I use Emacs, so etags seems a

Re: [BackupPC-users] BackupPC future development (was: Backuppc and windows)

2013-04-06 Thread shawn wilson
What he meant to say was (either nothing as you don't reply to spam or) this isn't a jobs list and you didn't supply any job related info anyway. Also, off topic and bad posts seem to create as much or more traffic than meaningful posts so try not to do that (as can be seen by two replies to your

Net::DNS

2013-03-07 Thread shawn wilson
What am I doing wrong here? I'm obviously not understanding what object is being returned by $packet. use strict; use warnings; use Data::Dumper; use Net::DNS::Resolver; my $dns = Net::DNS::Resolver-new; print rev_ip('8.8.8.8') . \n; sub rev_ip { my ($ip) = @_; my $packet =

Re: Net::DNS

2013-03-07 Thread shawn wilson
On Thu, Mar 7, 2013 at 11:40 AM, Lawrence Statton lawre...@cluon.com wrote: On 03/07/2013 10:21 AM, shawn wilson wrote: use Data::Dumper; use Net::DNS::Resolver; my $dns = Net::DNS::Resolver-new; print rev_ip('8.8.8.8') . \n; sub rev_ip { my ($ip) = @_; my $packet = $dns-search

Re: Net::DNS

2013-03-07 Thread shawn wilson
On Thu, Mar 7, 2013 at 12:29 PM, Lawrence Statton lawre...@cluon.com wrote: On 03/07/2013 11:00 AM, shawn wilson wrote: However, when I @EXPORT this function from a module, I get this: Can't call method pre on an undefined value at lib/Misc.pm line 45, line 723793. if (my $answer

Re: Net::DNS

2013-03-07 Thread shawn wilson
On Thu, Mar 7, 2013 at 2:04 PM, shawn wilson ag4ve...@gmail.com wrote: On Thu, Mar 7, 2013 at 12:43 PM, Lawrence Statton lawre...@cluon.com wrote: On 03/07/2013 11:29 AM, Lawrence Statton wrote: On 03/07/2013 11:00 AM, shawn wilson wrote: However, when I @EXPORT this function from a module

Re: reading file or pipe

2013-02-08 Thread shawn wilson
On Fri, Feb 8, 2013 at 2:06 AM, Jim Gibson jimsgib...@gmail.com wrote: The null filehandle () will read from standard input if @ARGV is empty, and from the members of @ARGV, interpreting each scalar as a file name to be opened automatically in succession. Does that do what you want?

reading file or pipe

2013-02-07 Thread shawn wilson
How do I take in a file or pipe input? What I want is: script.pl file.txt or cat file.txt | script.pl What I'm trying is: my $logfile; if (@ARGV and $ARGV[0] =~ /^-./) { open($logfile, '', $ARGV[0]); } elsif (-t STDIN and not @ARGV) { $logfile = STDIN; } else { doe no data } PS - I want to

Re: reading file or pipe

2013-02-07 Thread shawn wilson
Ah, yeah that'll work. I can just set a count and die blah if $count == 0; Didn't think I could do that with a diamond. Thanks On Fri, Feb 8, 2013 at 2:06 AM, Jim Gibson jimsgib...@gmail.com wrote: On Feb 7, 2013, at 10:34 PM, shawn wilson wrote: How do I take in a file or pipe input? What I

Re: grouping in regex

2012-12-23 Thread shawn wilson
it might be better to use a named capture here since you're expecting certain things and then you don't have to do if defined. On Sun, Dec 23, 2012 at 5:43 PM, Zachary Bornheimer z...@chary.me wrote: For this error, try something like this: Take note of any regex changes that you were advised

combining data structure

2012-12-13 Thread shawn wilson
I'm having some issues getting this to work correctly and hoped y'all might let me know where i'm going wrong here (and maybe some code review as some of this looks ugly to me): #!/usr/bin/env perl use strict; use warnings; use Config::Any; use Data::Dumper; my $config =

Re: Need a Perl Book for Beginner

2012-12-04 Thread shawn wilson
I have a copy of the Perl Black Book for a few years and it is still fairly mint fwiw. i'd go with modern perl or beginning perl. or find whatever interests you and pick up *cookbook (how i like to learn) and then start looking at (scrutinizing) other peoples' code. On Tue, Dec 4, 2012 at 6:13

Re: Need a Perl Book for Beginner

2012-12-04 Thread shawn wilson
On Tue, Dec 4, 2012 at 7:07 PM, Sébastien Feugère seb.feug...@gmail.com wrote: I use Programming Perl (the Camel Book) too++, but some people don't recommend it for beginners. Even if it has been re-issue this year, maybe they think it's too much old-styled. yeah, it's why i didn't mention

Re: Need a Perl Book for Beginner

2012-12-04 Thread shawn wilson
also, since the op was on a free kick, i'll point this out (maybe i've done so before in this forum) - http://hackershelf.com/browse/ On Tue, Dec 4, 2012 at 11:20 PM, Franklin Lawerence franklin.lawere...@gmail.com wrote: Thanks a lot. :) -Frank On Wed, Dec 5, 2012 at 9:23 AM, Chankey Pathak

Re: last regex question (for the evening)

2012-11-22 Thread shawn wilson
i think i got it working correctly. thanks for your help: my ($ip, $ident, $userid, $time, $cgi, $url, $proto, $status, $size_tx, $ref, $ua, $size_rx, $re_time) = /^ ([-0-9\.]+)\# ip address (\S+)\ #

return something

2012-11-21 Thread shawn wilson
how do i return something when i've got a long regex and one of the captures is empty? $_ = '435 634; my ($one, $two, $three)= /^ (\d+)\ (\d+)\ (\d+) /x; -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org

last regex question (for the evening)

2012-11-21 Thread shawn wilson
how do i capture all quoted strings? this gives an error: print $str1\n; ($one, $two) = $str1 =~/([^(?:[^])]*) (\d+)/; print $one $two\n; what i want is: $str1 = \something\ 444; $str1 = escaped quote\\\ 321; $str1 = esc quote\\\ other stuff\ 567; to match - and sometimes there are

Re: last regex question (for the evening)

2012-11-21 Thread shawn wilson
as well), i'd sorta like a regex answer vs a module. On Wed, Nov 21, 2012 at 9:29 PM, Shawn H Corey shawnhco...@gmail.com wrote: On Wed, 21 Nov 2012 20:54:29 -0500 shawn wilson ag4ve...@gmail.com wrote: how do i capture all quoted strings? Get Regexp::Common from CPAN and read Regexp::Common

Re: last regex question (for the evening)

2012-11-21 Thread shawn wilson
couldn't figure out how to parse this with a regex. i also feel the education might be worth the masturbation time. On Wed, Nov 21, 2012 at 9:46 PM, shawn wilson ag4ve...@gmail.com wrote: that's a pretty cool module - i especially like their regex with lookup table trick. however, since i've got

xml find text with wildcard

2012-11-10 Thread shawn wilson
what is the best way to find nodes a certain string (in this example: /Find Me/) ? in the example below, i'm getting too much output - i'd only expect 2 and 4. i had read there's a way of doing this with a newer LibXML, but i was unable to get it to work nor find documentation to suggest the perl

Re: Is comp.lang.perl dead?

2012-10-22 Thread shawn wilson
On Tue, Oct 23, 2012 at 1:10 AM, John W. Krahn jwkr...@shaw.ca wrote: Danny Gratzer wrote: I'm looking at comp.lang.perl and it doesn't seem like it's had new posts in well, years. Is it dead? It died in 1995. i thought usenet died in '96? i got a news reader up the other day, went through

Re: Learning CPAN

2012-10-06 Thread shawn wilson
besides news, you can also check out some of the perl mongers communities / lists. and you can get on irc - on freenode, there's #perl-help, and on the perl irc server, there's tons of different channels - even if you don't have anything to ask, sometimes it's good / fun to read the scroll every

Re: Perl Code

2012-09-09 Thread shawn wilson
On Sun, Sep 9, 2012 at 5:20 PM, Jenda Krynicky je...@krynicky.cz wrote: Actually ... what percentage of websites doing email address validation in their forms do you think validate according to the RFC? 0.001%? i've never seen anyone do it correct in production. -- To unsubscribe, e-mail:

Re: Perl Code

2012-08-31 Thread shawn wilson
of course it's homework. though if the student would be so kind to inform the list what the class's (and instructor's) best answer is to #3, i'll be able to inform them whether the class is worth staying in. seriously, it's a much harder question than it seems. also, the cool way of answering #1

Re: subroutine in seperate file, question

2012-08-11 Thread shawn wilson
On Aug 10, 2012 11:41 PM, pa...@riseup.net wrote: I mean to ask, wether they will clash with the same loaded modules loaded in calling script? No. they are loaded only once. Well, they will both be in ISA to look up separately but there is no conflict.

Re: Perl MVC framework

2012-07-20 Thread shawn wilson
On Thu, Jul 19, 2012 at 9:46 PM, Francisco Valladolid H. fic...@gmail.com wrote: Hi. On Thu, Jul 19, 2012 at 8:38 PM, Chris Stinemetz chrisstinem...@gmail.com wrote: What is the best Perl MVC framework for someone to learn that has minimal web development back ground, but is intermediate

  1   2   3   >