Re: multiline matching

2004-01-15 Thread Kenton Brede
On Thu, Jan 15, 2004 at 08:38:11AM -0600, James Edward Gray II ([EMAIL PROTECTED]) wrote: > On Jan 14, 2004, at 10:28 PM, Kenton Brede wrote: > > >On Wed, Jan 14, 2004 at 09:57:51PM -0600, James Edward Gray II > >([EMAIL PROTECTED]) wrote: > >>On Jan 14, 2004, at 7:22 PM, Jose Malacara wrote: >

Re: JPG FILE DOUBTS

2004-01-15 Thread John McKown
On Thu, 15 Jan 2004, Andre Chaves Mascarenhas wrote: > Hello i wanna know what Perl module can I use and what commands to do the folowing: > 1-Check to see if the file is a valid jpg file You didn't say what OS. If you're running Linux (or almost any UNIX based system), then I'd do something lik

Re: Dumping values of all vars

2004-01-15 Thread Dan Anderson
On Thu, 2004-01-15 at 18:17, James Edward Gray II wrote: > On Jan 15, 2004, at 5:06 PM, Dan Anderson wrote: > > > And I agree that Data::Dumper is much more complicated then it needs to > > be. > > Data::Dumper is a standard module and I find it super useful. I just > showed it in a one liner,

Re: Dumping values of all vars

2004-01-15 Thread James Edward Gray II
On Jan 15, 2004, at 5:06 PM, Dan Anderson wrote: And I agree that Data::Dumper is much more complicated then it needs to be. Data::Dumper is a standard module and I find it super useful. I just showed it in a one liner, so I don't think we can say it's too hard to get into. I encourage others

Re: Dumping values of all vars

2004-01-15 Thread Dan Anderson
> As a rule though, Data::Dumper doesn't erase data, as you can see below: One more thing. I have noticed a problem with Data::Dump where if the data structures are too complex the data can disapear. I'm not quite sure why. Usually I use it in {}s on a temporary variable which is a copy of what

Re: Dumping values of all vars

2004-01-15 Thread Dan Anderson
On Thu, 2004-01-15 at 17:59, James Edward Gray II wrote: > On Jan 15, 2004, at 4:40 PM, Dan Anderson wrote: > > > I use the Data::Dump package which is a standard module. > > I'm willing to bet you actually use Data::Dumper. Oh yeah, how much are we betting? My car could use turbo chargers and

Re: Dumping values of all vars

2004-01-15 Thread Dan Anderson
On Thu, 2004-01-15 at 17:59, James Edward Gray II wrote: > On Jan 15, 2004, at 4:40 PM, Dan Anderson wrote: > > > I use the Data::Dump package which is a standard module. > > I'm willing to bet you actually use Data::Dumper. Nope. I use Data::Dump. Then I call Data::Dump::dump() to dump a vari

Re: Dumping values of all vars

2004-01-15 Thread James Edward Gray II
On Jan 15, 2004, at 4:40 PM, Dan Anderson wrote: I use the Data::Dump package which is a standard module. I'm willing to bet you actually use Data::Dumper. Be warned that calling Data::Dump::dump($variable) will undef $variable! Well, Dump() (not dump) is meant to be called as a method and takes

Re: Dumping values of all vars

2004-01-15 Thread Dan Anderson
On Thu, 2004-01-15 at 12:35, zentara wrote: > On Wed, 14 Jan 2004 12:40:31 -0700, [EMAIL PROTECTED] (Jdavis) wrote: > > >Hello, > > Is it possible to dump the values of all the vars in a perl script > >easily? I want to have a sub called Error that when called > >will tell me the current value of

Re: Data File, turn fields on mulitple lines into records on one line.. .

2004-01-15 Thread david
Taylor Lewick wrote: > Hi all. Need some help. > > I have a data file that looks like this... > > Date > Team Name 1 > Team Name 2 > Field1 > Field2 > FieldX > > Date > Team Name 3 > Team Name 4 > Field 1 > FieldX > > and so on... are entries always separate by an empty line? > > Each entr

Data File, turn fields on mulitple lines into records on one line.. .

2004-01-15 Thread Lewick, Taylor
Hi all. Need some help. I have a data file that looks like this... Date Team Name 1 Team Name 2 Field1 Field2 FieldX Date Team Name 3 Team Name 4 Field 1 FieldX and so on... Each entry will have the data and team 1 and 2's name. But the number of fields will be variable... I would really li

RE: JPG FILE DOUBTS

2004-01-15 Thread Dan Muey
> > > Hello i wanna know what Perl module can I use and what Howdy > commands to do the folowing: 1-Check to see if the file is a 1) use Imager, GD, Image::Magick, search.cpan.org search for image,jpg, jpeg > valid jpg file 2-Check the file size 2) perldoc -f stat > > Thanks in advance >

Re: JPG FILE DOUBTS

2004-01-15 Thread Dan Anderson
Check out http://search.cpan.org/ . I found a number of results doing a quick search for both JPEG and JPG. -Dan -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

JPG FILE DOUBTS

2004-01-15 Thread Andre Chaves Mascarenhas
Hello i wanna know what Perl module can I use and what commands to do the folowing: 1-Check to see if the file is a valid jpg file 2-Check the file size Thanks in advance

Re: error.

2004-01-15 Thread Rob Dixon
Drieux wrote: > > On Jan 14, 2004, at 3:02 PM, Eric Walker wrote: > > > Does anyone know what this means... > > code.. > > for ($i = 0;$i <= $size; $i+=$temp){ > > $type= split(::,shift (@hold)); > > } > > > > Warning: > > Use of implicit split to @_ is deprecated at .//test.pl line 21 > > >

Re: Dumping values of all vars

2004-01-15 Thread Peter Scott
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] (Jdavis) writes: >Hello, > Is it possible to dump the values of all the vars in a perl script >easily? I want to have a sub called Error that when called >will tell me the current value of all the vars in the script. You can dump out all the vari

Re: Upgrading Perl linux 5.6 rpm to 5.8.2 source

2004-01-15 Thread drieux
On Jan 14, 2004, at 11:16 AM, Guay Jean-Sébastien wrote: Which I interpreted as "without being forced to reinstall all my modules which are not part of the standard Perl distribution". So you confirm that that isn't possible, and that any modules that contain XS code and which were not part of

Re: strange sort order

2004-01-15 Thread Daniel Staal
--As off Wednesday, January 14, 2004 11:24 PM -0500, Daniel Staal is alleged to have said: my @a = unpack("C*", $a); my @b = unpack("C*", $b); This can also be done with a: my @a = split //, $a; # (That is a null pattern.) I'm not sure if split or unpack is faster, I'll have to benchma

Re: error.

2004-01-15 Thread drieux
On Jan 14, 2004, at 3:02 PM, Eric Walker wrote: Does anyone know what this means... code.. for ($i = 0;$i <= $size; $i+=$temp){ $type= split(::,shift (@hold)); } Warning: Use of implicit split to @_ is deprecated at .//test.pl line 21 here's a bit of a shilly thought for ($i = 0;$

knowledge v. IDE was Re: Apel of VIM was Emacs Wizards

2004-01-15 Thread drieux
On Jan 14, 2004, at 12:56 PM, Bradley A. Brown wrote: [..] but I heard it said once that knowledge of a language can never be replaced by an IDE. [..] I want to underscore that. Mastering a Language means understanding it's subtle nuances and arcanea, which is Perl is a LifeStyle, and not someth

Re: deprecated

2004-01-15 Thread drieux
On Jan 15, 2004, at 2:14 AM, Jabez Wilson wrote: [..] Forgive my ignorance, but in this context what does "deprecated" actually mean? [..] as most have noted, 'deprecated' denotes that while the "foo" will function in this release it is no longer considered good form, and may well be removed in

Re: Apel of VIM was Emacs Wizards

2004-01-15 Thread Randal L. Schwartz
> "Jeff" == Jeff Westman <[EMAIL PROTECTED]> writes: Jeff> As driex pointed out, it is the start-up time that is preferred in Jeff> vi/vim. But again, a true emacs die-hard never exits the "editor" Jeff> and does all his/her tasks inside the of it. I type "screen emacs" about once every th

RE: Apel of VIM was Emacs Wizards

2004-01-15 Thread Bradley A. Brown
Nicely put. Bradley -Original Message- From: Dan Anderson [mailto:[EMAIL PROTECTED] Sent: Thursday, January 15, 2004 10:02 AM To: Jeff Westman Cc: Perl Beginners Subject: RE: Apel of VIM was Emacs Wizards On Wed, 2004-01-14 at 18:22, Jeff Westman wrote: > Incidently, emacs has a 'dired

RE: Apel of VIM was Emacs Wizards

2004-01-15 Thread Dan Anderson
On Wed, 2004-01-14 at 18:22, Jeff Westman wrote: > Incidently, emacs has a 'dired mode' (directory editor) which is > very nice... much like the old 'list' shareware in DOS land of the > dark past you can bring up a list of files (like 'ls -l'), then > view and selectively execute or delete all

Re: deprecated

2004-01-15 Thread drowl
> Jenda Krynicky wrote: >> >> From: "Rob Dixon" <[EMAIL PROTECTED]> >> > Jabez Wilson wrote: >> > > In scalar context, returns the number of fields found and splits >> into the "@_" array. Use of split in scalar context is deprecated, >> however, because it clobbers your subroutine arguments." >>

Re: deprecated

2004-01-15 Thread Rob Dixon
Jenda Krynicky wrote: > > From: "Rob Dixon" <[EMAIL PROTECTED]> > > Jabez Wilson wrote: > > > In scalar context, returns the number of fields found and splits > > > into the "@_" array. Use of split in scalar context is deprecated, > > > however, because it clobbers your subroutine arguments." > >

Re: CGI: Premature end of script headers

2004-01-15 Thread Wiggins d Anconia
> I've installed AM Lite on an HP-UX 11.0 system running Apache 2 with PERL > 5.8.0. When accessing http://root/cgi-bin/amadmin.pl, I get the following > error: > > Server error! > Error message: > Premature end of script headers: /opt/apache2/lib/htdocs/cgi-bin/amadmin.pl > If you think this is a

Re: Emacs Wizards

2004-01-15 Thread Dan Anderson
On Wed, 2004-01-14 at 11:07, Paul Kraus wrote: > Is there a way to easily have emacs comment out xnumber of lines. M-x comment-region will comment out a marked region. C-x ( starts defining a macro. Type the keys you'd normally type to comment out a line, i.e. C-a # SPC Now hit C-x ). The macro

Re: multiline matching

2004-01-15 Thread James Edward Gray II
On Jan 14, 2004, at 10:28 PM, Kenton Brede wrote: On Wed, Jan 14, 2004 at 09:57:51PM -0600, James Edward Gray II ([EMAIL PROTECTED]) wrote: On Jan 14, 2004, at 7:22 PM, Jose Malacara wrote: Since you've already been shown the super easy way, I'll dare to be a little different: #!/usr/bin/perl

Re: no digest

2004-01-15 Thread Casey West
It was Thursday, January 15, 2004 when Paul Kraus took the soap box, saying: : I have tried the nntp route 4 times. Every time I end up getting half the : messages and they come in hours behind the mailing list. Are you sure you're using the nntp.perl.org news server? I've never heard of a proble

Re: deprecated

2004-01-15 Thread Jenda Krynicky
From: "Rob Dixon" <[EMAIL PROTECTED]> > Jabez Wilson wrote: > > In scalar context, returns the number of fields found and splits > > into the "@_" array. Use of split in scalar context is deprecated, > > however, because it clobbers your subroutine arguments." > > > > Forgive my ignorance, but in t

RE: no digest

2004-01-15 Thread Paul Kraus
I have tried the nntp route 4 times. Every time I end up getting half the messages and they come in hours behind the mailing list. Paul Kraus --- PEL Supply Company Network Administrator > -Original Message- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Beh

CGI: Premature end of script headers

2004-01-15 Thread PerlDiscuss - Perl Newsgroups and mailing lists
I've installed AM Lite on an HP-UX 11.0 system running Apache 2 with PERL 5.8.0. When accessing http://root/cgi-bin/amadmin.pl, I get the following error: Server error! Error message: Premature end of script headers: /opt/apache2/lib/htdocs/cgi-bin/amadmin.pl If you think this is a server error, p

Re: multiline matching

2004-01-15 Thread drowl
> On Wed, Jan 14, 2004 at 06:22:58PM -0700, Jose Malacara wrote: >> Can someone explain to me how to do multiline matching? I am trying to >> extract three consecutive lines from a datafile containing multiple >> records like this: >> Hi All well i was reading through and i have a similar proble

Re: deprecated

2004-01-15 Thread Rob Dixon
Jabez Wilson wrote: > > In scalar context, returns the number of fields found and splits > into the "@_" array. Use of split in scalar context is > deprecated, however, because it clobbers your subroutine > arguments." > > Forgive my ignorance, but in this context what does "deprecated" actually me

Re: strange sort order

2004-01-15 Thread Rob Dixon
Daniel Staal wrote: > > > Oh no! Its slower! I wrote a function implementing what is > > described above and its actually slower (about 1/2 as slow) than > > that huge thing I posted earlier. Does anything stand out here as > > being inefficient? Here it is: > > (First glance stuff:) > > > sub comp

Re: strange sort order

2004-01-15 Thread Rob Dixon
Danl001 wrote: > > I do not have access to the sort operation. All I have is a file that is > "sorted" but I don't know exactly the mechanism by which it was sorted. > What I am trying to do is write a comparison function--given any two > lines in this file, return -1, 0, 1 as perl's cmp function d

Re: deprecated

2004-01-15 Thread Paul Johnson
Jabez Wilson said: > " > In scalar context, returns the number of fields found and splits > > into the "@_" array. Use of split in scalar context is > > deprecated, however, because it clobbers your subroutine > > arguments." > > Forgive my ignorance, but in this context what does "deprecated" act

Re: deprecated

2004-01-15 Thread Gary Stainburn
On Thursday 15 Jan 2004 10:14 am, Jabez Wilson wrote: > " > In scalar context, returns the number of fields found and splits > > into the "@_" array. Use of split in scalar context is > > deprecated, however, because it clobbers your subroutine > > arguments." > > Forgive my ignorance, but in this

deprecated

2004-01-15 Thread Jabez Wilson
" In scalar context, returns the number of fields found and splits into the "@_" array. Use of split in scalar context is deprecated, however, because it clobbers your subroutine arguments." Forgive my ignorance, but in this context what does "deprecated" actually mean? -

Re: RFC: Package == class == object type

2004-01-15 Thread Gary Stainburn
On Wednesday 14 Jan 2004 3:04 pm, Wiggins d Anconia wrote: > > On Tuesday 13 Jan 2004 5:05 pm, Wiggins d Anconia wrote: > > > > On Tuesday 13 Jan 2004 3:04 pm, James Edward Gray II wrote: > > > > > On Jan 13, 2004, at 6:24 AM, Gary Stainburn wrote: > > > > > Hi, > > > > I've not responded to these