Hi, Joshua, :)
On Thu, 16 Jan 2003, Scott, Joshua wrote:
> I've got a CSV file which I need to process. The format is as follows.
>
> "Smith, John J",1/1/2002,1/15/2002,"Orlando, FL",Florida
> "Doe, John L",1/1/2002,1/15/2002,Los Angeles, California
>
> I've tried splitting it using: @row = spl
Hi, Mark, :)
On Wed, 11 Dec 2002 [EMAIL PROTECTED] wrote:
> I have a list of names, separated by the '/' character in a
> variable, $list, and a name in the variable $name. If the name
> appears in the list, I want to remove it and clean up $list. It
> takes me 4 calls to s///, and it looks clu
Hi, Jerry, :)
On Tue, 10 Dec 2002, Jerry Rocteur wrote:
> Anyone know how to write a grep -C in Perl ?
Here is a script that mimics just the '-C' feature of GNU grep. It
doesn't support the fanciness of printing filenames when multiple
input files are specified.
This may be overkill for your s
Yo, Mark,
On Mon, 9 Dec 2002, Mark Goland wrote:
> Ok I got it working now, thanx much Jason. Only question I have is
> regarding this.
Good! Glad I could help.
> $head ||= $link;
This is a Perl idiom to set a variable if it hasn't already been set.
So, if $head == undef, then $head will
Hi, Mark, :)
On Sun, 8 Dec 2002, Mark Goland wrote:
> I am having problems printing this doubly list. the bug statment
> prints the expacted so I think I have the list setup right, but I
> cant get this list to print in reverse... any ideas ??
> #!/usr/bin/perl -w
# Always do this.
use strict;
Hi, Todd & Jeff, :)
From: "Jeff 'japhy' Pinyan" <[EMAIL PROTECTED]>
> On Nov 13, todd shifflett said:
>> the above works. Now I would like to be able to pass in a
>> subroutine from a declared object.
> You mean a "method" (that is, a function that is "bound" to an object).
>> my $fft = new Ma
Hi, Todd (and Wiggins!), :)
On Wed, 13 Nov 2002, todd shifflett wrote:
> I am trying to use a code reference from within a function to
> recursively call a given separate function...
> #--- LIKE THIS --vv
> sub hello {
> my $name = shift;
> return "Hello, $name!\n";
> }
>
> sub foo
Hi, Wiggins, :)
On Mon, 11 Nov 2002, Wiggins d'Anconia wrote:
> This solution works well and is clean, if you are curious about some
> of the *magic* he is performing in his foreach I would suggest
> reading up on the special variable $_ for those of us experienced in
> perl it isn't as daunting
Hi, Doug, :)
On Mon, 11 Nov 2002, Cacialli, Doug wrote:
> I'm new to programming in perl, and relatively new to programming at
> all, so I apologize if this is a little hard to follow.
Wasn't hard at all! You described the problem very succinctly.
> I've got oodles of data. It looks like this
Hi, Coe, :)
On Wed, 16 Oct 2002, coe smythe wrote:
> Can some one please explain $i to me? It is my understanding that
> this is one of those special little variables. Sorry, and thanks.
This isn't a stupid question... however, if you provided a little more
context, perhaps we might be of mor
Hi, Jeff, :)
On 15 Oct 2002, jeff wrote:
> Quick question. I want to pass a variable to a non-oo module that I
> created. But I how do I get the module to contain the value of the
> variable that was created in the 'main' namespace.
In general, this is not good style. A module should be a
self
Hi, Jeff, :)
On Mon, 17 Sep 2001, Jeff 'japhy/Marillion' Pinyan wrote:
> On Sep 17, Jason Tiller said:
> >2) Duplicate path entries must be removed from the *tail*, not the
> > head of the path.
> Then reverse the string, screw around with it, and reverse it again
Hi, Paul, :)
On Tue, 18 Sep 2001, Paul Johnson wrote:
> On Mon, Sep 17, 2001 at 03:25:20PM -0700, Jason Tiller wrote:
> > I'm trying to write a short script to remove duplicate entries in
> > my PATH variable.
> The script I use to do this is
>
> print join
Hi, Jeff! :)
On Mon, 17 Sep 2001, Jeff 'japhy/Marillion' Pinyan wrote:
> On Sep 17, Jason Tiller said:
> It's pretty good. The only change I would make is to structure it in a
> slightly more idiomatic fashion:
>
> my %paths;
> $paths{$_}++ for split /:/,
rays, a
hash, and then looping through the entries.
However, I'm at a loss to see the structure of such an 's///g'
construct. Anybody have any ideas on how I should go about tackling
this?
Thanks in advance for any help!
---Jason Tiller
[EMAIL PROTECTED]
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Hi, Bob, :)
Thanks for the detailed response! I figured I was on the right path,
but confirmation greatly appreciated. :)
On Mon, 17 Sep 2001, Bob Showalter wrote:
> Now, can you tell why '~' is matched by
>
>/(?:^|[^~])~$/
Because the '(?:re1|re2)' is a zero-length, non-capturing anchor
Hello, Again, Bob, :)
On Fri, 14 Sep 2001, Bob Showalter wrote:
> You can use look-behind assertion:
>
>/(? Which means, match a tilde, not preceded by a tilde, anchored to the
> end of the string. This will match:
>foo~
>~
>
> But not:
>
>foo~~
>~~
I'm trying to understand
Hi, Randall! :)
(BTW, great book. :-D In case you hadn't been told enough!)
On 13 Sep 2001 [EMAIL PROTECTED] wrote:
> > "Bob" == Bob Showalter <[EMAIL PROTECTED]> writes:
> Bob> perl -e '-f $_ || print "Missing $_\n" for map {/^(.*)\.c$/; "$1.out"}
> Bob> @ARGV' *.c
> No. You've used $1
Hi, Bob, :)
This is so great!
On Thu, 13 Sep 2001, Bob Showalter wrote:
> > -Original Message-
> > In a directory there exist *.c and *.out files. Here *.out is
> > created for every *.c file. I need to check whether .out is
> > generated for all the .c file. How to achive this.
> p
Hi, Again, Brian, :)
On Wed, 12 Sep 2001, Bradshaw, Brian wrote:
> I have the code:
> $z = 0;
> foreach(@key = keys(%result))
> {
>$arr_DBanswers[$z] = $result{$_};
>$z=$z+1;
> }
> Is there a better way to break out the values in a hash list to a
> single array?
How about
@arr
Hi, Andrea, :)
On Wed, 12 Sep 2001, Andrea Holstein wrote:
> Jason Tiller wrote:
> > # Find the string bounded by "". The '.+?'
> > # finds all characters but isn't greedy; ".+" would match all of the
> > # characters between the
you want, you could do the "join"
using some other character than space, such as '@', so that you could
then replace all of the '@'s that were left with newlines and restore
some semblance of the original pargraph's spacing.
I hope this was helpful for you - it was a good learning experience
for me. :)
---Jason Tiller
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
22 matches
Mail list logo