Re: Best way to grab lines n thru x of a file

2008-04-10 Thread Mathew
I think a simpler solution would be to use head and tail: head -n x > file.txt tail -n x-n file.txt > file2.txt Xavier Noria wrote: On Apr 10, 2008, at 18:24 , Jonathan Mast wrote: Hi, I have a ~125MB file of which I want to read lines n thru n+x and write those into a separate file. What

CPAN force method question

2008-04-15 Thread Mathew
mod_name). Can I run CPAN::Shell::force(install,mod_name)? Would it be best to simply run CPAN::Module::force(install,mod_name)? Mathew -- JJ: "I've lost faith in you Matt." Matt: "What?" JJ: "You're listening to Metallica." Matt: "Come on now, it isn

Re: [OT] perldoc typo

2006-08-24 Thread Mathew
doc -f filehandle Huh? There's no filehandle function in my Perl. Cheers! --Tom Phoenix Stonehenge Perl Training I too, tried to check and found that I had no filehandle function. -- Mathew Snyder -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTE

Non-technical question

2006-09-20 Thread Mathew
pronounce it has no impact on how my or anyone else's scripts run. I've just been curious about what would, I guess, be considered the official pronunciation. How would Larry pronounce it? Mathew -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.5 (MingW32) Comment: U

Re: problem with stat?

2006-09-22 Thread Mathew
gets better with every new version of perl. > But wouldn't that only look for the parent director file? Isn't it looking for a file with exactly two dots? -- Mathew -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>

Re: problem with stat?

2006-09-22 Thread Mathew
I had tried this /^[.]$|^[..]$/ but had been getting errors about Posix. I'm not at the same system or even same OS now so I can't reproduce though. -- Mathew -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>

Re: Why is Perl a SHE

2006-10-09 Thread Mathew
zentara wrote: > On Mon, 09 Oct 2006 06:18:58 -0400, [EMAIL PROTECTED] (Mathew > Snyder) wrote: > >> zentara wrote: >>> This is perfect for jokes. >>> How about: > >> Those are just bad...real bad. >> Mathew Snyder > > So was the question

Re: Why is Perl a SHE

2006-10-10 Thread Mathew
zentara wrote: > On Mon, 09 Oct 2006 07:44:01 -0400, [EMAIL PROTECTED] (Mathew) > wrote: > >> zentara wrote: >>> On Mon, 09 Oct 2006 06:18:58 -0400, [EMAIL PROTECTED] (Mathew >>> Snyder) wrote: >>> >>>> zentara wrote: >>>>>

Website down?

2006-10-20 Thread Mathew
I'm trying to get onto the beginners.perl.org website so I can change my email address but it keeps hanging at about halfway. Is it down? Mathew -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://

Re: Website down?

2006-10-20 Thread Mathew
Mathew wrote: > I'm trying to get onto the beginners.perl.org website so I can change my > email address but it keeps hanging at about halfway. Is it down? > > Mathew > > Nevermind, it was just wicked slow at the time. Mathew -- To unsubscribe, e-mail: [EMAIL PR

Re: Help with WWW::Mechanize

2006-11-29 Thread Mathew
Well hot-damn! Ain't that sumthin? I'm going to design a keyboard that puts the zero next to the one. If we don't protect freedom of speech, how will we know who the assholes are? http://theillien.blogspot.com Tom Phoenix wrote: > On 11/28/06, Mathew Snyder <[EMAIL PROTE

Re: Help with WWW::Mechanize - Next Question

2006-12-03 Thread Mathew
Rob Dixon wrote: > Mathew Snyder wrote: >> With all the help I've received I've been able to get this working. >> This is my >> text: >> #!/usr/bin/perl >> >> use warnings; >> use strict; >> use WWW::Mechanize; >> use HTML::Tok

Re: Email::Address Segmentation Fault

2006-12-06 Thread Mathew
Rob Dixon wrote: > Mathew Snyder wrote: >> Rob Dixon wrote: >>> >>> Mathew Snyder wrote: >>>> >>>> Yes, that is exactly what I get. >>> >>> Then can you post something that /doesn't/ work for you please? >> >

Re: Why is this not working?

2006-12-08 Thread Mathew
John W. Krahn wrote: > Mathew Snyder wrote: >> Code snippet at the end of my little script: >> >> >> ... >> my $count; >> foreach my $email (@emails){ >> print $email, "\n"; >> $count += 1; >> }; >&

Re: module to calculate time difference between two

2006-12-12 Thread Mathew
06/05/msg6342.html Mathew -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>

Re: %Re: installing question

2007-01-09 Thread Mathew
I don't know anything about Gentoo nor do I care about a debate regarding it. I think the Windows comment though was a simply a clever retort to a pointless post. Mathew David Gama Rodriguez wrote: > Hi all, > > I read this post and I'm concern. > why are you s

Re: remove duplicate lines

2007-01-10 Thread Mathew
beast wrote: > Mumia W. wrote: >> On 01/10/2007 01:35 AM, beast wrote: >>> [...] >>> It will only remove duplicate key. >>> >>> Is this still acceptable in perl (its very ugly =( >>> [...] >> >> This would remove duplicate lines: >> >> use List::MoreUtils qw(uniq); >> use File::Slurp; >>

Re: How to determine the most recent file created

2007-01-14 Thread Mathew
r sequence. Every 10 minutes, I need to copy the most recent > (latest) of these save file to another directory (say, dir-B) . I cannot > make the application directly generate the autosave file to dir-B. Is > there > a way to do this in Perl? > > TIA > Steve > perld

simple perl script on Windows

2007-01-18 Thread Mathew
#x27;t doing anything. If I had to guess, it is saying to replacy everything up to the first space with nothing. While this isn't what I want it to do, having it do that would probably be a good step in the right direction. However, it won't even do that. What am I doing wrong here?

Re: simple perl script on Windows

2007-01-18 Thread Mathew
Thanks. That likely will help. However, I still can't even get it to perform any action. I have it set to print to the screen right now but it isn't creating any output. Mathew Guerrero, Citlali (GE, Corporate, consultant) wrote: > Hi Mathew : > > This is what your

Re: Extract user from email address

2007-02-02 Thread Mathew
I'm hesitant to bring another module into this. I don't want to make it any more complicated than it needs to be. Mathew Adriano Ferreira wrote: > On 2/2/07, Mathew Snyder <[EMAIL PROTECTED]> wrote: >> I have a script which extracts email addresses from a web page,

Re: Extract user from email address

2007-02-06 Thread Mathew
Chad Eldridge wrote: > Rob Dixon wrote: >> Chad Eldridge wrote: >> > >>> Mathew wrote: >> >> >>>> Adriano Ferreira wrote: >> >>> >>>>> On 2/2/07, Mathew Snyder <[EMAIL PROTECTED]> wrote: >> >>&

Re: Please help with convoluted script

2007-02-09 Thread Mathew
is corrects the problem I mentioned regarding skipping the 31st of Jan which was in the middle of the week. Is that a good assumption? Mathew Tom Phoenix wrote: > On 2/3/07, Mathew Snyder <[EMAIL PROTECTED]> wrote: > >> my @date = (localtime)[3..5]; >> my $day

Off-Topic: Is the Randall Schwartz of Perl Fame?

2007-03-05 Thread Mathew
http://articles.techrepublic.com.com/2100-1009_11-6164113.html?tag=nl.e019 Mathew -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Re: Off-Topic: Is the Randall Schwartz of Perl Fame?

2007-03-05 Thread Mathew
Well in that case, congratulations Randal Mathew Ovid wrote: > --- Mathew <[EMAIL PROTECTED]> wrote: > > http://articles.techrepublic.com.com/2100-1009_11-6164113.html?tag=nl.e019 >> Mathew > > Yes, it's the same one. Oregon computer crime laws are such a pitif

Question about system call

2007-03-12 Thread Mathew
it isn't a matter of trying to find a way to get the former to work. I'm just wondering what might have caused it to not work. Mathew -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

email text

2007-04-28 Thread Mathew
his though. Although, something tells me I'm completely over-thinking it. Can someone help? Mathew -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Re: email text

2007-04-28 Thread Mathew
riable with the data I'm sending. The data looks like this: Ticket IDhh:mm - 0000:00 1111:11 2222:22 And so on. That is what gets placed in the file but I'd prefer it be placed inside the email. Mathew Nigel Peck wrot

Re: email text

2007-04-28 Thread Mathew
I'll have to look at the HEREDOC option. I'm not familiar with that. As for HTML, people here get quite frisky when they don't get plain text emails. Mathew Robert Hicks wrote: > I typically use a HEREDOC to format my email messages. You can do all > sort of things by send

Re: Stuck on a hash referrence, kinda

2007-05-13 Thread Mathew
Rob Dixon wrote: > Mathew Snyder wrote: >> >> [EMAIL PROTECTED] wrote: >>> >>> Mathew Snyder wrote: >>>> >>>> A subroutine I'm working on takes two hash references. The hashes >>>> are each >>>> actually a Ho

Re: Can't sort error out; strict refs

2007-05-16 Thread Mathew
Rob Dixon wrote: > Mathew Snyder wrote: >> >> I'm passing two hash references into a subroutine. One hash is in the >> format of >> $dept{$env}{$user}. This contains an amount of time spent by each >> user on a >> customer ($env). The second hash

Re: YARQ: Yet Another Regex Question

2007-05-16 Thread Mathew
Chas Owens wrote: > On 5/16/07, Mathew Snyder <[EMAIL PROTECTED]> wrote: >> I have a trouble ticket application that uses a regex to find a piece of >> information in an incoming email and auto populate a field if it is >> found. The >> line it will be looki

Re: YARQ: Yet Another Regex Question

2007-05-16 Thread Mathew
Chas Owens wrote: > On 5/16/07, Mathew <[EMAIL PROTECTED]> wrote: > snip >> What does gr() do? >> >> Mathew >> > > qr not gr. It is the quote regex operator. > > from perldoc perlop > qr/STRING/imosx > This o

Re: Hash Key is a Null Value

2007-06-14 Thread Mathew
Looks like there's an extra single quote after Dumper(\%h); Keep up with my goings on at http://theillien.blogspot.com Xu, Lizhe wrote: > On Jun 14, 8:50 am, [EMAIL PROTECTED] (Chas Owens) wrote: >> To force Data::Dumper to do the right thing for the >> display you must set $Data::Dumper::Useqq t

Re: Hash Key is a Null Value

2007-06-14 Thread Mathew
had not been set instead of just leaving a big ugly blank spot. Keep up with my goings on at http://theillien.blogspot.com Chas Owens wrote: > On 6/14/07, Mathew Snyder <[EMAIL PROTECTED]> wrote: >> I'm building a hash using values from a database backend to an >> appl

Re: Hash Key is a Null Value

2007-06-14 Thread Mathew
Erk...nevermind. didn't realize that was a continuance from the line above it. Keep up with my goings on at http://theillien.blogspot.com Xu, Lizhe wrote: > On Jun 14, 8:50 am, [EMAIL PROTECTED] (Chas Owens) wrote: >> To force Data::Dumper to do the right thing for the >> display you must set $D

Re: Alternatives to highly nested hashes

2007-06-20 Thread Mathew
Rob Dixon wrote: > Mathew Snyder wrote: >> It looks like an object is what I want. Am I correct? Suppose I need >> to work >> with a bit of data that actually has 11 attributes. This would be an >> object of >> another type. However, I need to manipulate pie

Re: problem with readline

2007-06-23 Thread Mathew
Tom Phoenix wrote: > On 6/23/07, Mathew Snyder <[EMAIL PROTECTED]> wrote: > >> foreach my $address (readline AUTHFILE){ >> chomp($address); >> next if $address =~ m/^#/gmx; > > The author of that code probably doesn't know what /g, /m, and /x do

Re: nevermind

2007-06-23 Thread Mathew
Actually, I didn't write the code. It was written by someone else whom no longer works at our company. Keep up with my goings on at http://theillien.blogspot.com Paul Lalli wrote: > On Jun 23, 4:18 am, [EMAIL PROTECTED] (Mathew Snyder) wrote: >> You'll notice in the secti

Re: Problem with runaway format

2007-07-01 Thread Mathew
:D Funny you should say that... Actually, all the data is being pulled in from a database already. Keep up with my goings on at http://theillien.blogspot.com Ken Foskey wrote: > On Sun, 2007-07-01 at 05:40 -0400, Mathew Snyder wrote: >> I have a script which places data 4 levels

Re: AJAX, Graphs and Perl backend

2007-07-01 Thread Mathew
cldmismgr wrote: > On Jul 1, 1:05 am, [EMAIL PROTECTED] (Mathew Snyder) wrote: >> Does anyone know what the best route to creating graphs using AJAX and Perl >> would be? I've been running various searches on this and haven't found any >> solid information on how to

Re: Problem with runaway format

2007-07-02 Thread Mathew
kens wrote: > On Jul 1, 5:40 am, [EMAIL PROTECTED] (Mathew Snyder) wrote: >> I have a script which places data 4 levels deep in a HoHoHoH. It grabs >> tickets >> in our ticket system using the systems API and places attributes about each >> piece of activity into

Re: Problem with runaway format

2007-07-02 Thread Mathew
Tom Phoenix wrote: > On 7/1/07, Mathew Snyder <[EMAIL PROTECTED]> wrote: > >> The problem didn't surface until I went from using the %tikSubj hash >> seen near >> the top of the code snippet to a multi-level hash. But then, using >> %tikSubj >>

Re: Problem with runaway format

2007-07-02 Thread Mathew
Tom Phoenix wrote: > On 7/2/07, Mathew <[EMAIL PROTECTED]> wrote: > >> foreach my $date (@searchDate) { >> while (my $ticket = $tix->Next) { > > Seeing this worries me. I don't know enough about what's going on to > tell whether it'

GD::Graph

2007-07-15 Thread Mathew
Is this module really as simple as it appears? -- Keep up with my goings on at http://theillien.blogspot.com -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Re: Building a string to contain a "\"

2007-11-17 Thread Mathew
You have to escape it with another backslash. 'C:\\ /S' Keep up with my goings on at http://theillien.blogspot.com AndrewMcHorney wrote: > Hello > > I am trying to build a string that contains the following text "dir c:\ > /S" so I can get a complete directory of all the files on drive C and >

Re: Printing a hash - weird behavior

2001-06-08 Thread Mathew Hennessy
"Randal L. Schwartz" wrote: > > > "jbarry" == jbarry <[EMAIL PROTECTED]> writes: > > jbarry> /(.*?),/; #pattern matching. Grabs everything up to the first comma. > jbarry> (The material number) > jbarry> $key = $1; > > NEVER use $1 unless it's in the context of a conditiona

Re: the ENV command? parameter?

2001-06-08 Thread Mathew Hennessy
Aha! No gratuitous perl alternatives list is complete without map! map {print "$_: $ENV{$_}\n"} keys %ENV; Hee hee :) - Matt Aaron Craig wrote: > > At 12:13 07.06.2001 -0400, you wrote: > >Progress!! now I understand what the 'QUERY_STRING' is! > > > >and a little > > > >foreach(@key = keys(

Re: Gurus Wanted!!

2001-06-08 Thread Mathew Hennessy
"Randal L. Schwartz" wrote: > > > "Jeff" == Jeff Yoak <[EMAIL PROTECTED]> writes: > > Jeff> At 11:50 PM 6/7/01 +, scott lutz wrote: > >> I have a this fancy bit of recursive search and replace code that I > >> picked up somewhere, but I would greatly appreciate it if one of the > >> guru

Re: testing null strings for form field values

2001-06-04 Thread Mathew Hennessy
[EMAIL PROTECTED] wrote: > > if ( $formdata{view_name} ne "" ) { > $view = $formdata{view_name}; > $viewtag = "1"; > } > > is there a special method for testing against a null string for a form > field's value? i am using the above data, but it seems to always return exists() will t

Re: flock

2001-06-04 Thread Mathew Hennessy
Paul wrote: > > One option is to rename the logfile temporarily. Have the script call > it something like LogTemp$$ or something ($$ is the PID of the current > job). Then it doesn't *exist* in it's previous name. Move it back to > the original filename when you're done. If you have admi

Re: Regular Expression

2001-06-04 Thread Mathew Hennessy
Satheesh Ramakrishnan wrote: > > All, > > How do I assign 1298b to some scalar variable from the string below. > > context_config_file = "1298b"; this is probably a cookbook, but ## require 5; # for (.*?) rege

Re: Beginners Training books

2001-06-04 Thread Mathew Hennessy
Carl Barnes wrote: > > To beginners community > > What book(s) do you consider the best for gaining > experience in using Perl. > I have been a visual basic programmer, and dabbled > with C++, but Perl seems to pull the best of all of Hi, I would recommend O'Reilly's _Learning Perl_ who

Re: Find the number of elements in a hash.

2001-06-04 Thread Mathew Hennessy
Doug Johnson wrote: > > Is there a similar way to find the number of keys in a hash without cycling > through them and without assigning the hash to an array? Dunno if you can avoid counting them, but $keycount = keys(%hash) will do what you want. Hopefully there's an optimization somew

Re: i'm warning you, this is a toughie!

2001-06-04 Thread Mathew Hennessy
Nichole Bialczyk wrote: > > The problem is that I don't know exactly what the problem is. I can write > to the logfile when I run it in Unix, but not when I try to access it > from the web. He says that it is more secure to write to our server than > it is to write to afs. But I can't make it wor

Re: write out filenames of files existing on a filesystem into a file

2006-07-08 Thread Mathew Snyder
The most direct way I can think of would be to simply open the file again and read each line writing it to another file exactly as you want. I'm still rather inexperienced with perl myself so I wouldn't know off-hand how to do this exactly. Mathew Nishi Bhonsle wrote: > Mathew: &g

MOVE ON ALREADY!!!

2006-07-12 Thread Mathew Snyder
Please. This thread has gone on long enough. What started out as a question with mixed responses (admittedly, I think mine may have been off the mark), has turned into a waste of my drive space. So with respect to those of us that have seen enough MOVE ON ALREADY!!! Mathew Snyder Mr. Shawn H

Re: MOVE ON ALREADY!!!

2006-07-13 Thread Mathew Snyder
Mike Martin wrote: > On 13/07/06, OROSZI Balázs <[EMAIL PROTECTED]> wrote: >> Hi guys! >> >> I'm a total Perl beginner, and I delete most mails, as either I cannot >> answer or I'm not interested. I'm reading through this thread from the >> Trash folder, and this is what I gathered: >> >> Mr. Sha

First big project

2006-07-18 Thread Mathew Snyder
be my first big project with perl, I'm unfamiliar with the various modules and such that I should use to set this up. Any help will be greatly appreciated and if I haven't provided enough information, please ask me to elaborate. Thank You, Mathew Snyder -- To unsubscribe, e-mail: [EMAIL

Re: [OT] Re: Regex find and replace - delete line

2006-07-24 Thread Mathew Snyder
Please lighten up. Mathew Snyder D. Bolliger wrote: Randal L. Schwartz am Montag, 24. Juli 2006 09:39: "D> . . . we have 34 degrees here 34 degrees of what? Celsius. I'll include the following disclaimer in further posts: DISCLAIMER: Please excuse my bad english. How ma

Re: Major Applications of Perl

2006-07-31 Thread Mathew Snyder
/www.bioperl.org/wiki/How_Perl_saved_human_genome ry http://www.perldesk.com/ http://www.bestpractical.com/rt Mathew Snyder -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>

Re: book to learn perl

2006-08-02 Thread Mathew Snyder
Sayed, Irfan (Irfan) wrote: > Hi, > > Can anybody plz guide , which is the best book to learn perl. > > some good names plz > > Regards > Irfan. > > Learning Perl from www.oreilly.com is a good primer. Mathew Snyder -- To unsubscribe, e-mail: [EMAIL PROT

Re: Programming WAP pages

2006-08-21 Thread Mathew Snyder
wave.com/. They have free SDKs (if you choose to use them... remember, these are plain ol' web apps), and free simulators (very, very useful). Todd W. This kind of thinking is why there are so many problems rendering pages in non-IE browsers on the desktop. Mathew -- To unsubsc

Re: [OT] Programming WAP pages

2006-08-21 Thread Mathew Snyder
Todd W wrote: "Mathew Snyder" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] The most popular web browser found in cell phones is made by openwave. Personally, I consider the openwave browser the "standard" (If a phone dosen't have an op

Re: NetSSH

2006-09-13 Thread Mathew Snyder
Kaushal Shriyan wrote: > On 9/13/06, Lee Goddard <[EMAIL PROTECTED]> wrote: >> > I am getting the below error >> > >> > C:\perlsc>perl sshperl1.pl >> > Can't locate Net/SSH/Perl.pm in @INC (@INC contains: >> > c:/Perl/lib c:/Perl/site/li b .) at sshperl1.pl line 1. >> > BEGIN failed--compilation ab

Re: Question on the "Camel" book

2006-09-21 Thread Mathew Snyder
command line make a difference? I ran them both entering 0 each time and I got 0 back. This is what it looks like: [EMAIL PROTECTED]:~> perl -e 'if ($_ = ) { print; }' 0 <---input value 0 <---returned value [EMAIL PROTECTED]:~> perl -e 'if (defined($_ = )) { print; }&

Re: Question on the "Camel" book

2006-09-21 Thread Mathew Snyder
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Dr.Ruud wrote: > "flotsan" schreef: > >> it is told the following two statements are >> different: >> >> 1) if ($_ = ) { print; } # suboptimal: doesn't test defined >> 2) if (defined($_ = )) { print; } # best >> >> But as I see it, these two do the

problem with stat?

2006-09-22 Thread Mathew Snyder
ncatenation (.) or string at ./fileAccess.pl line 18. Is stat() not getting the information from $filename that I'm expecting it to? How do I use it if not the way I'm trying? Mathew -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.2 (GNU/Linux) Comment: Using GnuPG with Mozilla - ht

Re: problem with stat?

2006-09-22 Thread Mathew Snyder
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Mathew Snyder wrote: > I'm trying to figure out how to use stat. I have the following code: > > #!/usr/bin/perl -w > > use strict; > > my @filenames; > my $processDir = "/usr/bin"; > > opendir DH

Re: problem with stat?

2006-09-22 Thread Mathew Snyder
re " . $file_count . " items in the filenames array.\n"; The hash appears to be getting partially populated as my output is giving me this: Use of uninitialized value in concatenation (.) or string at ./fileAccess.pl line 19. autoconf: It doesn't seem like the stat c

Re: Question on the "Camel" book

2006-09-22 Thread Mathew Snyder
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 John W. Krahn wrote: > Mathew Snyder wrote: >> John W. Krahn wrote: >>>> Yes, Perl has five "false" values: undef, (), 0, '' and '0', and two of >>>> those >>>> are valid inp

Re: problem with stat?

2006-09-22 Thread Mathew Snyder
op. I corrected the match expression and prepended the directory to each file prior to running stat on it but didn't save the new value to the array. I was having a hard time understanding the - -f option and the line with grep in it so I didn't bother with those this time around. Pe

Re: problem with stat?

2006-09-22 Thread Mathew Snyder
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Dr.Ruud wrote: > Mathew Snyder schreef: > >> foreach my $file (sort(readdir DH)){ >> next if ($file =~ /^.%|^..$/); >> my $mod_time = (stat($file))[9]; >> $filenames{$file} = $mod_time; >> }

Re: problem with stat?

2006-09-22 Thread Mathew Snyder
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 John W. Krahn wrote: > Mathew Snyder wrote: >> John W. Krahn wrote: >>>>> my @filenames; >>>>> my $processDir = "/usr/bin"; >>>>> >>>>> opendir DH, $processDi

Re: problem with stat?

2006-09-22 Thread Mathew Snyder
Dr.Ruud wrote: > "Dr.Ruud" schreef: >> Mathew Snyder: > >>> foreach my $file (sort(readdir DH)){ >>> push @filenames, $file; >>> } >> You sort too early. > > Ignore that. Just use John's alternative: > > my @fi

Re: problem with stat?

2006-09-22 Thread Mathew Snyder
Dr.Ruud wrote: > "Dr.Ruud" schreef: >> Mathew Snyder: > >>> foreach my $file (sort(readdir DH)){ >>> push @filenames, $file; >>> } >> You sort too early. > > Ignore that. Just use John's alternative: > > my @fi

Re: problem with stat?

2006-09-22 Thread Mathew Snyder
Dr.Ruud wrote: > Mathew Snyder schreef: >> Dr.Ruud: > >>> my @filenames = sort grep -f, readdir DH; >> I tried this line using $dh. Nothing was getting placed in the array. >> Would that be because everything in /usr/bin is an executable file? > > Aaa

Listerine

2006-10-01 Thread Mathew Snyder
Sorry. Just had to do it. :) -- Mathew Snyder -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>

Re: Why is Perl a SHE

2006-10-09 Thread Mathew Snyder
;> Jerry > > This is perfect for jokes. > How about: > > Because he loves Perl, and he isn't gay? > > He loves to f**k with his code all day? > > Perl's a bitch until you get to know her? > > Perl coding is like mental masterbation? > > &

Database entries into a hash or array

2006-11-15 Thread Mathew Snyder
I need to pull all the entries for a column from a database. I'm using DBI and the database is MySQL. How I do pull the data I need and place it into a hash or an array? I can build the $sth but haven't a clue how to extrapolate the data after the query runs. Mathew -- To unsubscri

Re: Database entries into a hash or array

2006-11-15 Thread Mathew Snyder
I get no output whatsoever. Even uncommenting one gives me nothing. How do I tell the script to discard the three items but continue to populate the database with everything else? Mathew -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>

Re: Database entries into a hash or array

2006-11-15 Thread Mathew Snyder
Ah-hah, of course! Thanks. Mathew John W. Krahn wrote: > Mathew Snyder wrote: >> Figured it out. >> >> New question though. Here's my code: >> >> #!/usr/bin/perl >> use DBI; >> use strict; >> >> my $dbh = DBI->connect ( "db

Re: Database entries into a hash or array

2006-11-16 Thread Mathew Snyder
I'm actually working on that now :D Mathew Roman wrote: > Wouldn't it be better to filter the result with the sql statement? Instead > of doing it in perl. > > > -Original Message- > From: Mathew Snyder [mailto:[EMAIL PROTECTED] > Sent: Thursday, 16 Nov

What is 'new' doing?

2006-11-22 Thread Mathew Snyder
In this line of code what is 'new' doing? my $users = new RT::Users(RT::SystemUser); Mathew -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>

Re: What is 'new' doing?

2006-11-22 Thread Mathew Snyder
Thanks! Mathew Adriano Rodrigues wrote: > On 11/22/06, Mathew Snyder <[EMAIL PROTECTED]> wrote: >> In this line of code what is 'new' doing? >> my $users = new RT::Users(RT::SystemUser); > > Mathew, > > This is called the indirect object notatio

Help with WWW::Mechanize

2006-11-28 Thread Mathew Snyder
name if the HTML source tells me there is? Any help would be appreciated. Mathew -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>

Re: Help with WWW::Mechanize

2006-11-30 Thread Mathew Snyder
Tom Phoenix wrote: > On 11/28/06, Mathew Snyder <[EMAIL PROTECTED]> wrote: > >> I have a form I'm trying to fill out. One of the fields, despite >> being named in >> the HTML source keeps erroring out on me. > >> > >> fiel

Help with WWW::Mechanize - Next Question

2006-12-02 Thread Mathew Snyder
se of HTML::TokeParser. This leads to my next question. Do I need to use that? Would it be simpler to just parse the data matching against a regex and put any matches into a file? I imagine I don't need to sift through all the HTML tags just to get to the email addresses since they are fairly easy to spot. Mathew -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>

Re: Help with WWW::Mechanize - Next Question

2006-12-05 Thread Mathew Snyder
Rob Dixon wrote: > Mathew Snyder wrote: >> With all the help I've received I've been able to get this working. >> This is my >> text: >> #!/usr/bin/perl >> >> use warnings; >> use strict; >> use WWW::Mechanize; >> use HTML::Tok

Email::Address Segmentation Fault

2006-12-06 Thread Mathew Snyder
ing it on a SuSE box and two Fedora Core 5 boxes. I get the same result both times. Does anyone know if this is a buggy module? Version is 1.883-1 Mathew -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>

Re: Email::Address Segmentation Fault

2006-12-06 Thread Mathew Snyder
Mathew Snyder wrote: > I can't seem to get this working. Every time I try to run it segfaults on me. > I've removed it from my code and reverted to the stage I was at before I added > it and my script worked exactly as it did before I put it in. I've installed >

Re: Email::Address Segmentation Fault

2006-12-06 Thread Mathew Snyder
Rob Dixon wrote: > Mathew Snyder wrote: >> Mathew Snyder wrote: >>> I can't seem to get this working. Every time I try to run it >>> segfaults on me. >>> I've removed it from my code and reverted to the stage I was at >>> before I added >

Re: Email::Address Segmentation Fault

2006-12-06 Thread Mathew Snyder
Rob Dixon wrote: > Mathew Snyder wrote: >> Mathew Snyder wrote: >>> I can't seem to get this working. Every time I try to run it >>> segfaults on me. >>> I've removed it from my code and reverted to the stage I was at >>> before I added >

Re: Email::Address Segmentation Fault

2006-12-06 Thread Mathew Snyder
Rob Dixon wrote: > Mathew Snyder wrote: >> Rob Dixon wrote: >>> Mathew Snyder wrote: >>>> Mathew Snyder wrote: >>>>> I can't seem to get this working. Every time I try to run it >>>>> segfaults on me. >>>>> I&#x

Re: Email::Address Segmentation Fault

2006-12-06 Thread Mathew Snyder
Rob Dixon wrote: > Mathew Snyder wrote: >> >> Rob Dixon wrote: >>> >>> Look at the code below. Is this what you get? >>> >>> >>> use strict; >>> use warnings; >>> >>> use Email::Address; >>> >

Why is this not working?

2006-12-07 Thread Mathew Snyder
outside of the scope of any block of code shouldn't it be available in any block of code? Mathew -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>

Re: Email::Address Segmentation Fault

2006-12-08 Thread Mathew Snyder
Rob Dixon wrote: > Mathew Snyder wrote: >> >> I can't seem to get this working. Every time I try to run it >> segfaults on me. >> I've removed it from my code and reverted to the stage I was at before >> I added >> it and my script worked exactly

[Fwd: Re: Email::Address Segmentation Fault]

2006-12-08 Thread Mathew Snyder
Rob Dixon wrote: > Mathew Snyder wrote: >> >> I can't seem to get this working. Every time I try to run it >> segfaults on me. >> I've removed it from my code and reverted to the stage I was at before >> I added >> it and my script worked exactly

Re: module to calculate time difference between two

2006-12-12 Thread Mathew Snyder
Mumia W. wrote: > On 12/12/2006 06:35 AM, Mathew wrote: >> >> Maybe this can get you started: >> http://beta.nntp.perl.org/group/perl.datetime/2006/05/msg6342.html >> >> Mathew >> >> > > What is beta.nntp.perl.org ? > > > I'

Re: Which module for web graph?

2006-12-14 Thread Mathew Snyder
rpose? > Thanks. > > -- > Books below translated by me to Chinese. > Practical mod_perl: http://home.earthlink.net/~pangj/mod_perl/ > Squid the Definitive Guide: http://home.earthlink.net/~pangj/squid/ > I think GD and GD::Graph are what you are looking for. Don't quote me on that th

  1   2   3   >