Efficient matching

2007-05-21 Thread Karyn Williams
per file. I am wondering how these different methods may impact performance. I hope I have been clear. TIA. -- Karyn Williams Network Services Manager California Institute of the Arts [EMAIL PROTECTED] http://www.calarts.edu/network -- To unsubscribe, e-mail: [EMAIL PROTECTED] For

Redirecting STDOUT & STDERR

2007-05-07 Thread Karyn Williams
: $rcount\n"; print "Kicked as dups: $acount\n"; print "Kicked as exceptions: $ecount\n"; print "Accounts created: $lcount\n"; # send via e-mail output of this script. my $to = "To: [EMAIL PROTECTED]"; my $from = "From: [EMAIL PROTECTED]"; my $subject = &qu

substitute and assign in one line

2007-04-17 Thread Karyn Williams
alpha only version in $lfirst. TIA. -- Karyn Williams Network Services Manager California Institute of the Arts [EMAIL PROTECTED] http://www.calarts.edu/network -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Re: Exiting loops

2007-03-30 Thread Karyn Williams
At 03:05 PM 3/30/07 +0100, Rob Dixon wrote: >Karyn Williams wrote: >> >> I have a sh script as follows. The script worked OK until the year rolled >> over. My (now deleted) simple sh way of figuring the month and year blew >> up. I decided to rewrite the script in pe

RE: Exiting loops

2007-03-29 Thread Karyn Williams
At 09:48 AM 3/29/07 -0700, Wagner, David --- Senior Programmer Analyst --- WGO wrote: >> -Original Message- >> From: Karyn Williams [mailto:[EMAIL PROTECTED] >> Sent: Wednesday, March 28, 2007 17:54 >> To: beginners@perl.org >> Subject: RE: Exiting loops &g

RE: Exiting loops

2007-03-28 Thread Karyn Williams
t; Thanks. > > Wags ;) >David R Wagner >Senior Programmer Analyst >FedEx Freight >1.408.323.4225x2224 TEL >1.408.323.4449 FAX >http://fedex.com/us > > >> -Original Message- >> From: Karyn Williams [mailto:[EMAIL PROTECTED] >> Se

Exiting loops

2007-03-28 Thread Karyn Williams
if ( $count = grep /user=$k/o, ) { print "$k checked mail $count times in maillog.$flist[5].\n"; next ; } else { close MAILLOG; print "$k has not checked their mail in the last 6 months.\n"; } } } } }

Re: Conditional operator

2007-03-07 Thread Karyn Williams
At 10:04 AM 3/7/07 -0800, Tom Phoenix wrote: >On 3/7/07, Karyn Williams <[EMAIL PROTECTED]> wrote: > >> if ($initial =~ "") { > >You probably don't want the binding operator =~ in there, but the >string equality test eq, right? Check the perlop man

Re: Conditional operator

2007-03-07 Thread Karyn Williams
At 09:58 AM 3/7/07 -0800, Karyn Williams wrote: >At 09:35 AM 3/7/07 -0800, Tom Phoenix wrote: >>On 3/7/07, Karyn Williams <[EMAIL PROTECTED]> wrote: >> >>> I have a script where I am trying to use the conditional operator. >>> Apparently I a

Re: Conditional operator

2007-03-07 Thread Karyn Williams
At 09:35 AM 3/7/07 -0800, Tom Phoenix wrote: >On 3/7/07, Karyn Williams <[EMAIL PROTECTED]> wrote: > >> I have a script where I am trying to use the conditional operator. >> Apparently I am confused as it always evaluates false. > >> $initial ? >>

Conditional operator

2007-03-07 Thread Karyn Williams
ast, $sid, SIR Fall 2007"; Output is : ltesting::Lisa Testing, 98, SIR Fall 2007,::/bin/sh/: fltestjr::ftest ltest Jr., 99, SIR Fall 2007,::/bin/sh/: I have validated that the value of $initial is correct, it equals A in the first instance and "" in the se

Complex splitting or alternative matching

2007-02-15 Thread Karyn Williams
ouncil,Student Affairs,Special:/usr/studc:/bin/nologin blackc:*:15768:15768:Black Clock,Bob Foser,Special:/usr/blackc:/bin/nologin jiee:*:15791:15791:JiYeo Lee:/usr/jiee:/bin/nologin mfa04:*:15794:15794:Karen Ason:/usr/mfa04:/bin/nologin -- Karyn Williams Network Services Manager California I

Re: hashes and loops

2005-06-15 Thread Karyn Williams
At 07:42 AM 6/15/05 -0700, you wrote: >Karyn Williams wrote: >> Also, >> there are just a handful of files BUT they are ever changing, so I would >> like to not list the statically in the code. >> >but this would work: > >chomp( my @lists = qx(ls /usr/local/

RE: hashes and loops

2005-06-14 Thread Karyn Williams
At 04:37 PM 6/14/05 -0700, you wrote: >Karyn Williams wrote: >> Below is code that I found on the web that I slightly modified. I am >> trying to create a script to remove from a file (tlist) the items in >> another file (tnames). This works but I have multiple files (tlis

hashes and loops

2005-06-14 Thread Karyn Williams
ocal/tools/tlist1") or die "$!"; print file3 join("\n",@missing); print file3 ("\n"); close (file3); TIA -- Karyn Williams Network Services Manager California Institute of the Arts [EMAIL PROTECTED] http://www.calarts.edu/network -- To unsubscribe, e-mail: [