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 $onelittle
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
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.. and
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
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
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');
$gz
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
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?
Either
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
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 ( $year,
: $month,
:
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
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$
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!
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
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 the first
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.. and
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
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! Grasshopper
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-mail: [EMAIL
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 program of the
20 matches
Mail list logo