Search Results

Search: Posts Made By: DemonixX
1,473
Posted By DemonixX
Thxz panyam, but I prefer it in perl script. Been...
Thxz panyam, but I prefer it in perl script. Been trying many ways already with scripting, I am not backing out now^.^

---------- Post updated at 09:29 AM ---------- Previous update was at 08:37...
1,473
Posted By DemonixX
Ok not sure how to use 'glob', never heard of...
Ok not sure how to use 'glob', never heard of it^^


#!/usr/bin/perl -w

@files = <*>;
foreach $file (@files) {
print $file . "\n";
}


I did this:

#!/usr/bin/perl
while($x = <*>) {...
1,473
Posted By DemonixX
Opening file and executing an action
I want the script to read the directory I am running the script from and print the contents of any file that has GX in it's title. This is the code needed[I think]. But how do I combine it?

...
7,041
Posted By DemonixX
Yep, it's an homework assignment...>_> And doing...
Yep, it's an homework assignment...>_> And doing this way is annoying...

---------- Post updated 08-20-09 at 04:08 AM ---------- Previous update was 08-19-09 at 03:10 PM ----------

So, could...
7,041
Posted By DemonixX
Cool, thxz tyler, but as I mentioned at the start...
Cool, thxz tyler, but as I mentioned at the start before the code,that I am looking for a script that does the shuffling using these 3 commands:pop, shift, & push.

Thxz for the hard wokr~
7,041
Posted By DemonixX
I did post it, I explained what I expect to come...
I did post it, I explained what I expect to come out of it, first it shuffles the 'cards' and prints out the top 5 'cards', which are different each time [Randomizer].
7,041
Posted By DemonixX
Shuffling 'cards' using perl.
I would be very grateful if someone could help me with this; using pop, shift, push, and the starting code below, I'd like a script that sufficiently "shuffles" a simulated deck of cards before...
3,089
Posted By DemonixX
Hey mate, thanks a lot for all the help! It...
Hey mate, thanks a lot for all the help!

It is working now!

~D~
8,506
Posted By DemonixX
Thxz balaji_red83! It working. I changed a...
Thxz balaji_red83! It working.

I changed a bit to make the result nicer:


my @nums = (2.1,1,3,10.1,10.2, 5);
my @sort_nums = sort {$a <=> $b} @nums;
my $grNum = pop @sort_nums;
print...
3,089
Posted By DemonixX
With this code I still get the above errors...
With this code I still get the above errors...
3,089
Posted By DemonixX
Just did some checking but still get these errors...
Just did some checking but still get these errors now...


line 1: USERS: command not found
line 8: [: : integer expression expected


I am running on CentOS re. 3.7.
3,089
Posted By DemonixX
Ok will do in the future. BTW I get these...
Ok will do in the future.

BTW I get these errors with the code you supplied.


line 1: USERS: command not found
line 8: [: : integer expression expected
8,506
Posted By DemonixX
Using perl code find greatest number.
How would one go about finding the greatest number in an array of numbers using loops and if statements? For example, if you had an array like this:

(4, 8, 3, 19, 6, 11)
3,089
Posted By DemonixX
Shell scripting.
Was wondering if someone could help me out. I get this error message each time I try to execute the code underneath.

/home/demon/some.sh: line 8: [: too many arguments
...
Showing results 1 to 14 of 14

 
All times are GMT -4. The time now is 08:17 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy