Find Jobs
Hire Freelancers

Perl question/assitance (not looking for an application)

$30-5000 USD

Abgeschlossen
Veröffentlicht vor etwa 20 Jahren

$30-5000 USD

Bezahlt bei Lieferung
I use DB_File and SDBM for all of my database needs in Perl..mainly because I can't find any good perl-MySQL tutorials. All the tutorials I find are just for MySQL, but not how to use Perl with it. What I need someone to do is teach me how to sort a complex hash. Please read full description below. ## Deliverables I use DB_File and SDBM for all of my database needs in Perl..mainly because I can't find any good perl-MySQL tutorials. All the tutorials I find are just for MySQL, but not how to use Perl with it. Anyway, I almost always store multiple values in tied hashes. For example: my %db; my $db = "[login to view URL]"; tie %db, "DB_File", "$db", O_CREAT | O_RDWR, 0644, $DB_BTREE or die "Cannot open file 'db': $!\n"; my $joined = join("::", $num, $ip, $time); $db{$url} = $joined; Then whenever I extract data, I split on :: into variables again. That's simple enough, the problem is I need to be able to sort on ANY variable split. For example, if in my database I had keys/values like: [login to view URL] 43::[login to view URL]::12355334543 [login to view URL] 23::[login to view URL]::5442234556 [login to view URL] 924:[login to view URL]::3221234565 Basically I use a URL as a key, then I use a NUMBER ($count):: an ip ($ip) :: time() ($time). I need someone to write me up a VERY VERY VERY basic example on how I could sort by any of $count, $ip, $time. To get an idea what I'm trying to do, please take a look at [login to view URL] . I want to make the table headers for COUNT, IP and TIME to be linked into [login to view URL] or ip or time Remember, the hash key and all the other data MUST be tied together some how. I can't just sort the varible and lose the rest. Please note: I've asked this question in two places: [login to view URL] [login to view URL] Your solution must be different than any proposed in those two links.. I need an easy-to-understand and implement way to do this, I don't understand array referencing so please refrain from that. In conclusion: I am looking for someone to write up a VERY easy to understand example on how to set a sort like this up and I'd like it to be as commented out as much as possible so I can better understand it. If I don't understand the script, the project isn't completed until we talk it over through here or in email until I understand why and how it works. (also: I'm not sure if it matters, but I need examples on how to sort numbers and strings since I'll be using this on other scripts as well). ## Platform not dependent exactly.
Projekt-ID: 3086486

Über das Projekt

2 Vorschläge
Remote Projekt
Aktiv vor 20 Jahren

Möchten Sie etwas Geld verdienen?

Vorteile einer Ausschreibung auf Freelancer

Legen Sie Ihr Budget und Ihren Zeitrahmen fest
Für Ihre Arbeit bezahlt werden
Skizzieren Sie Ihren Vorschlag
Sie können sich kostenlos anmelden und auf Aufträge bieten
Vergeben an:
Avatar des Nutzers
See private message.
$7 USD in 7 Tagen
4,8 (13 Bewertungen)
3,9
3,9
2 Freelancer bieten im Durchschnitt $8 USD für diesen Auftrag
Avatar des Nutzers
See private message.
$8,50 USD in 7 Tagen
0,0 (2 Bewertungen)
0,0
0,0

Über den Kunden

Flagge von UNITED STATES
United States
4,9
54
Mitglied seit Okt. 17, 2003

Kundenüberprüfung

Danke! Wir haben Ihnen per E-Mail einen Link geschickt, über den Sie Ihr kostenloses Guthaben anfordern können.
Beim Senden Ihrer E-Mail ist ein Fehler aufgetreten. Bitte versuchen Sie es erneut.
Registrierte Benutzer Veröffentlichte Jobs
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Vorschau wird geladen
Erlaubnis zur Geolokalisierung erteilt.
Ihre Anmeldesitzung ist abgelaufen und Sie wurden abgemeldet. Bitte melden Sie sich erneut an.