On Tue, Aug 19, 2008 at 10:39 AM, Jyotishmaan Ray <[EMAIL PROTECTED]> wrote:
> I would need it in a different server to create all the home directories.
>
> Kindly provide a different script for that.
There are websites out there that allow you to hire someone to work on
a project for you...
--
I would need it in a different server to create all the home directories.
Kindly provide a different script for that.
--- On Tue, 8/19/08, Anirban Adhikary <[EMAIL PROTECTED]> wrote:
From: Anirban Adhikary <[EMAIL PROTECTED]>
Subject: Re: Script neeed for creating home dir
You can do one thing
you just add the following lines at end of the while loop like this The
lines in bold character are newly added And one more thing when u will
creating the home directory of the users then u have the write ownership on
/mnt/btech directory.
Regards
Anirban Adhikary.
use str
Thank you Anirban.
Also do you any script for creating the home directories in a server
machine for 424 students in the path :
/mnt/btech/uid, where uid =
s08-1-5-097 for the same file read, as before.
All the students must have all permissions to read, write and execute in their
home dir
John W. Krahn wrote:
Richard Lee wrote:
something is wrong with this..
say %yahoo's key contains the variable , X
I wanted to go through the @array which has array of hashes... to see
if one of the value is equal to
X and if it is, wanted to assign the key of the @array to $ex_var..
Tracin
John W. Krahn wrote:
Richard Lee wrote:
something is wrong with this..
say %yahoo's key contains the variable , X
I wanted to go through the @array which has array of hashes... to see
if one of the value is equal to
X and if it is, wanted to assign the key of the @array to $ex_var..
Tracin
John W. Krahn wrote:
Richard Lee wrote:
something is wrong with this..
say %yahoo's key contains the variable , X
I wanted to go through the @array which has array of hashes... to see
if one of the value is equal to
X and if it is, wanted to assign the key of the @array to $ex_var..
Tracin
John W. Krahn wrote:
Richard Lee wrote:
something is wrong with this..
say %yahoo's key contains the variable , X
I wanted to go through the @array which has array of hashes... to see
if one of the value is equal to
X and if it is, wanted to assign the key of the @array to $ex_var..
Tracin
Richard Lee wrote:
something is wrong with this..
say %yahoo's key contains the variable , X
I wanted to go through the @array which has array of hashes... to see if
one of the value is equal to
X and if it is, wanted to assign the key of the @array to $ex_var..
Tracing the program, it only
something is wrong with this..
say %yahoo's key contains the variable , X
I wanted to go through the @array which has array of hashes... to see if
one of the value is equal to
X and if it is, wanted to assign the key of the @array to $ex_var..
Tracing the program, it only goes through 6 line
ry often...) then you can simply
reopen the file for each record.
while( <> ) {
my @lines = split(/[|]/);
my $file;
open( $file, '>>', "$lines[1].out" ) or die...
print $file $_;
close( $file ) or die...;
}
--
Ken Foskey
FOSS developer
--
To unsubscri
this and
> create
> a file for each result.
>
> So I would have a deptA.out file with deptA info then a deptB.out
> file with dept b info and etc.
>
> This is not exactly doing what I need:
>
> [ snip ]
>
> How would I create a file for each hash then print t
I am tring to use part of someones elses code that creates a data file which
prints
out like this:
ip|result|deptA|data
ip|result|deptB|data
ip|result|deptC|data
My goal instead of having all the data in one big file is to loop this and
create
a file for each result.
So I would have a
for each result.
So I would have a deptA.out file with deptA info then a deptB.out
file with dept b info and etc...
[...]
Although this is very different from your program, it should
give you the general idea:
use strict;
use warnings;
use File::Slurp;
use File::Spec::Functions;
my
On 8/23/06, Derek B. Smith <[EMAIL PROTECTED]> wrote:
From the previous emails, I do not understand what
parts of this code is doing and why is this practical?
The part is $union{$e} = 1 and $isect{$e} = 1 .
Also %count is never used.
It seems like Andrej made some mistakes in his code. I thin
fy this example
> that I can
> > calculate union and intersection for each pair of
> "n" arrays.
>
> Use a pair of nested loops; the outer picks one item
> from the n
> arrays, the inner picks a second. Inside, call your
> current code once
> for each pai
On 08/23/2006 09:58 AM, Andrej Kastrin wrote:
Hi,
below is simple solution for union and intersection for a pair of arrays
(@a and @b). How to modify this example that I can calculate union and
intersection for each pair of "n" arrays.
You could turn your code into a function a
On 8/23/06, Andrej Kastrin <[EMAIL PROTECTED]> wrote:
below is simple solution for union and intersection for a pair of
arrays (@a and @b). How to modify this example that I can
calculate union and intersection for each pair of "n" arrays.
Use a pair of nested loops; the oute
Hi,
below is simple solution for union and intersection for a pair of arrays (@a and @b). How
to modify this example that I can calculate union and intersection for each pair of
"n" arrays.
Thanks in advance for any suggestion, Andrej
##
use warnings;
@a = (
Wijaya Edward wrote:
Hi Mark,
Edward, for a beginner, would you mind explaining what the
>(1 .. $#arr)
$#arr is the index of the last element in the array
ok, so 1 .. $#arr is the same as 1 .. 2 where 2 is the index of b, yes..?
and qw actually do in this code.? Cheers
Mark Sargent <[EMAIL PROTECTED]> asked:
> >>$ perl -e '
> >>@arr = qw (a b c);
> >> foreach(1 .. $#arr)
> >>{
> >> print "$arr[$_]\n";
> >>}'
> Edward, for a beginner, would you mind explaining what the (1
> .. $#arr) and qw actually do in this code.? Cheers
I'm not Edward, but I'll give it a
Hi Mark,
> >
>
> Edward, for a beginner, would you mind explaining what the
>(1 .. $#arr)
$#arr is the index of the last element in the array
> and qw actually do in this code.? Cheers
with "qw" you are treating values inside as individual words
automatically. Thus you don't need to put quo
$ perl -e '
@arr = qw (a b c);
foreach(1 .. $#arr)
{
print "$arr[$_]\n";
}'
prints:
b
c
Is that what you want?
--
Regards,
Edward WIJAYA
SINGAPORE
Hi All,
Edward, for a beginner, would you mind explaining what the (1 .. $#arr)
and qw actually do in this code.? Cheers
Mark Sarg
Hi,
[EMAIL PROTECTED] <[EMAIL PROTECTED]> asked:
> How do I get a for each-statement to start at element 1
> (second element)
# probably bad for long lists
foreach my $item ( @list[1..$#list] ){
...
}
# quick but destroys @list
foreach my $item ( splice @list,1 ){
...
}
Of
Hi there!
Yes, exactly. Thanx a lot! :-)
/G
>
>
> - Original Message -
> From: [EMAIL PROTECTED]
> Date: Friday, October 7, 2005 3:29 pm
> Subject: for each
>
>> Hi there!
>>
> Hi!
>
>> How do I get a for each-statement to start at element
- Original Message -
From: [EMAIL PROTECTED]
Date: Friday, October 7, 2005 3:29 pm
Subject: for each
> Hi there!
>
Hi!
> How do I get a for each-statement to start at element 1 (second
> element)
$ perl -e '
@arr = qw (a b c);
foreach(1 .. $#arr)
{
print "$
Hi there!
How do I get a for each-statement to start at element 1 (second element)
/G
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>
Hi,
I run this on z/OS and perl-5.8.6.
$a = 128;
$b = 256;
for ($i=$a;$i<=$b;$i++)
{
$str = join '', $str, pack 'U*', $i;
}
if ($str =~ /(\p{inlatin1supplement}+)/)
{
print "\$1 : $1\n";
}
I get the following values :
a) for $a = 128
$b = 256
$1 has 1 byte
Thanks for the info Curis.
I don't think I saw any answers from the more internal aware gurus out there and like
Curtis, I would certainly like to know more about this.
TIA
At 14:32 2002.01.08, Curtis Poe wrote:
>--- Eric Beaudoin <[EMAIL PROTECTED]> wrote:
>> I was wondering if someone could
--- Eric Beaudoin <[EMAIL PROTECTED]> wrote:
> I was wondering if someone could explain why a variable define with a global scope
>was slower
> that one define within the local lexical scope when used in a loop?
If I recall correctly, you should usually get better performance from lexically scop
At 08:28 2002.01.08, Prahlad Vaidyanathan wrote:
>Hi,
>
>Was wondering which of these 2 pieces of code is more efficient :
>
>
>my $file ;
>foreach $file (@tarred) { #do something ; }
>foreach $file (@gzipped) { #do something else ; }
>
>
>OR
>
>
>foreach my $file (@tarred)
Prahlad Vaidyanathan wrote:
>
> Was wondering which of these 2 pieces of code is more efficient :
>
>
> my $file ;
> foreach $file (@tarred) { #do something ; }
> foreach $file (@gzipped) { #do something else ; }
>
>
> OR
>
>
> foreach my $file (@tarred) { #do someth
Hi,
could be more efficient the first code, because you allocate, the memory space
one single time.
In the second code you allocate the memory space every time.
Walter
> Hi,
>
> Was wondering which of these 2 pieces of code is more efficient :
>
>
> my $file ;
> foreach $file (@ta
Hi,
Was wondering which of these 2 pieces of code is more efficient :
my $file ;
foreach $file (@tarred) { #do something ; }
foreach $file (@gzipped) { #do something else ; }
OR
foreach my $file (@tarred) { #do something ; }
foreach my $file (@gzipped) { #do some
34 matches
Mail list logo