Re: Checking filenames? [:: ?Kinda Solved? ::]

2004-03-04 Thread Jas
Well seeing as how I am still really new to using perl I have accomplished what I set out to do and figured I would share it. The goal, a simple perl script to backup a web directory, compress the archive and then ftp the file(s) to a remote server. If anyone knows how to make this more robust,

Re: Checking filenames? [:: ?Kinda Solved? ::]

2004-03-04 Thread WC -Sx- Jones
In Cyberspace -- Jas wrote: my @files; find(sub { push @files,$File::Find::name },"/path/to/www/"); Archive::Tar->create_archive("www.tar",0,@files); Never hard-code your paths... Eases maintenance later... # Create Archive from recently created tarball my $gz = system('gzip -9 www.tar');

Re: Checking filenames? [:: ?Kinda Solved? ::]

2004-03-04 Thread Jas
Wc -Sx- Jones wrote: In Cyberspace -- Jas wrote: my @files; find(sub { push @files,$File::Find::name },"/path/to/www/"); Archive::Tar->create_archive("www.tar",0,@files); Never hard-code your paths... Eases maintenance later... Can you show me an example of how to do this? # Create A

Re: Checking filenames? [:: ?Kinda Solved? ::]

2004-03-04 Thread WC -Sx- Jones
Jas wrote: Wc -Sx- Jones wrote: In Cyberspace -- Jas wrote: my @files; find(sub { push @files,$File::Find::name },"/path/to/www/"); Archive::Tar->create_archive("www.tar",0,@files); Never hard-code your paths... Eases maintenance later... Can you show me an example of how to do this? Eit

Re: Checking filenames? [:: ?Kinda Solved? ::]

2004-03-04 Thread Jas
Wc -Sx- Jones wrote: Jas wrote: Wc -Sx- Jones wrote: In Cyberspace -- Jas wrote: my @files; find(sub { push @files,$File::Find::name },"/path/to/www/"); Archive::Tar->create_archive("www.tar",0,@files); Never hard-code your paths... Eases maintenance later... Can you show me an e

RE: Checking filenames? [:: ?Kinda Solved? ::]

2004-03-04 Thread Charles K. Clarkson
Jas <[EMAIL PROTECTED]> wrote: : : Wc -Sx- Jones wrote: : : > In Cyberspace -- Jas wrote: : > : > > # Create empty variables : > > my $year = ""; : > > my $month = ""; : > > my $day = ""; : > > my $c_year = ""; : > > my $c_month = ""; : > > my $c_day = ""; : > : > Less wordy... : > : > my ( $y

Re: Checking filenames? [:: ?Kinda Solved? ::]

2004-03-04 Thread WC -Sx- Jones
Jas wrote: chomp(my $userid = `/usr/ucb/whoami` || `/usr/bin/whoami` || 'root'); I am not sure what this means? Is this the process ID or the perl script is running as a root user? Nope, it is a simple short circuit to see who the UserID program of the program was; It states that if I cant tell

Re: Checking filenames? [:: ?Kinda Solved? ::]

2004-03-04 Thread WC -Sx- Jones
Hmmm, I get 3 Indians in only the first variable anyways =/ #! /usr/bin/perl -w use strict; # Make -w / use strict; happy... my ($onelittle, $twolittle, $threelittle, ) = 'Indians' x 3; print "1 $onelittle 2 $twolittle 3 $threelittle\n\n"; __END__ Output - bash-2.05$ p

RE: Checking filenames? [:: ?Kinda Solved? ::]

2004-03-04 Thread Charles K. Clarkson
WC -Sx- Jones [mailto:[EMAIL PROTECTED] : : Hmmm, I get 3 Indians in only the first variable anyways =/ : : : #! /usr/bin/perl -w : : use strict; : : # Make -w / use strict; happy... : my ($onelittle, : $twolittle, : $threelittle, : ) = 'Indians' x 3; Ahh! Gra

Re: Checking filenames? [:: ?Kinda Solved? ::]

2004-03-04 Thread WC -Sx- Jones
Charles K. Clarkson wrote: Make 'Indians' an array. my( $onelittle, $twolittle, $threelittle, ) = ('Indians') x 3; Create it with a HereDoc =) -Bill- __Sx__ http://youve-reached-the.endoftheinternet.org/ -- To unsubscribe, e-mail: [EMAIL PRO

RE: Checking filenames? [:: ?Kinda Solved? ::]

2004-03-04 Thread Sumit Kaur
20 Please suggest . Thanks -Original Message- From: Charles K. Clarkson [mailto:[EMAIL PROTECTED] Sent: Thursday, March 04, 2004 4:44 PM To: [EMAIL PROTECTED] Subject: RE: Checking filenames? [:: ?Kinda Solved? ::] WC -Sx- Jones [mailto:[EMAIL PROTECTED] : : Hmmm, I get 3 Indians in only

Re: Checking filenames? [:: ?Kinda Solved? ::]

2004-03-04 Thread wolf blaum
On Friday 05 March 2004 02:03, Sumit Kaur generously enriched virtual reallity by making up this one: > Hi, Hi, > I have to write my first Perl script . This scripts Searches for rare = > codons in nucleotide sequence . The nucleotide sequence is entered by = > the user in the format "ATTGCAA..

Re: Checking filenames? [:: ?Kinda Solved? ::]

2004-03-04 Thread John W. Krahn
"Charles K. Clarkson" wrote: > > WC -Sx- Jones [mailto:[EMAIL PROTECTED] > : > : Hmmm, I get 3 Indians in only the first variable anyways =/ > : > : # Make -w / use strict; happy... > : my ($onelittle, > : $twolittle, > : $threelittle, > : ) = 'Indians' x 3; > > Ahh

Re: Checking filenames? [:: ?Kinda Solved? ::]

2004-03-04 Thread John W. Krahn
Wc -Sx- Jones wrote: > > Charles K. Clarkson wrote: > > > Make 'Indians' an array. > > > > my( $onelittle, > > $twolittle, > > $threelittle, ) = ('Indians') x 3; > > Create it with a HereDoc =) Oh, how do you do that? John -- use Perl; program fulfillment -- To unsubscribe, e-

Re: Checking filenames? [:: ?Kinda Solved? ::]

2004-03-04 Thread John W. Krahn
Wc -Sx- Jones wrote: > > Jas wrote: > > > >> chomp(my $userid = `/usr/ucb/whoami` || `/usr/bin/whoami` || 'root'); > > > > I am not sure what this means? Is this the process ID or the perl > > script is running as a root user? > > Nope, it is a simple short circuit to see > who the UserID progra

Re: Checking filenames? [:: ?Kinda Solved? ::]

2004-03-05 Thread WC -Sx- Jones
John W. Krahn wrote: chomp(my $userid = `/usr/ucb/whoami` || `/usr/bin/whoami` || 'root'); Why not use $< to find out who you are? because in the original exercise (OP) I was showing how to greatly simplify a chain of possible failure and still have a usable outcome. Maybe root wasnt a great

Re: Checking filenames? [:: ?Kinda Solved? ::]

2004-03-05 Thread wolf blaum
On Friday 05 March 2004 02:03, Sumit Kaur generously enriched virtual reallity by making up this one: > Hi, Hi, > I have to write my first Perl script . This scripts Searches for rare = > codons in nucleotide sequence . The nucleotide sequence is entered by = > the user in the format "ATTGCAA..

Re: Checking filenames? [:: ?Kinda Solved? ::]

2004-03-05 Thread WC -Sx- Jones
John W. Krahn wrote: Wc -Sx- Jones wrote: Charles K. Clarkson wrote: Make 'Indians' an array. my( $onelittle, $twolittle, $threelittle, ) = ('Indians') x 3; Create it with a HereDoc =) Oh, how do you do that? I guess I made you all wait long enough... # WARNING - not strict or -w

Re: Checking filenames? [:: ?Kinda Solved? ::]

2004-03-06 Thread R. Joseph Newton
WC -Sx- Jones wrote: > Hmmm, I get 3 Indians in only the first variable anyways =/ Doesn't surprise me. The x is a concatentation multiplierfor strings. Why not just say what you want: $_ = 'Litttle' for my ($onelittle, $twolittle, $threelittle, ) ; print "1 $onelittl

nucleotide seq Was Re: Checking filenames? [:: ?Kinda Solved? ::]

2004-03-04 Thread WC -Sx- Jones
Sumit Kaur wrote: Hi, I have to write my first Perl script . This scripts Searches for rare = codons in nucleotide sequence . The nucleotide sequence is entered by = the user in the format "ATTGCAA.." and then the program breaks this = sequence in the groups of three alphabets like ATT,GCA...so no