#perl - Sat 5 May 2007 between 18:15 and 18:26



axscodenice then
:)
bultomjust like i wanted :)
stuufmy map/split version put an Hz at the end of every one
bultombut i really would like use only internal Perl fonction , without adding cpan addon
stuufmaybe there was an extra space at the end of the file
bultomis it possible to do so ?
axscodeyes
stuufjust read from the file yourself
bultomthe file is a /sys call :P
it give a line
stuufit's still a file
axscodemy $fs = `cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies`; $fs =~ s/ / Hz\n/g; print $fs
;
stuufopen my $freq, '<', "/sys/devices/system/cpu/cpu$cpu/cpufreq/scaling_available_frequencies";
print map { "$_ Hz" } split / /, <$freq>;
close $freq;
bultomuhu
that's a bit complicated for my newbish behaviour :D
axscodewe dont know whats "uhu"
stuufwhat, reading a file?
bultomuhu = WOW O_O
axscodeahaaa.. lol
bultomstuuf since i just put all that in a variable and call the variable later
i dunno really manipulating oping and reading files atm
stuufreading the file with perl is bettter than calling cat to do it
axscodei aggree.
bultomwell i founded 'system' gaster in perl doc :P
faster*
zachhow can i get rexex to identify color codes in mIRC..ya know when you copy and paste mIRC convos with color/bold/underline..into something like notepad for example
regex*
stuufit's just a file, there's no reason to create extra processes to read it
bultomopen my $blah, '<' /egegte/egegre/egege mean store what is in /egegte/egegre/egege in $blah ?
stuufit stores a file handle in $blah
you can read lines from it with <$blah>
perldoc perlopentut
bultomoh great
gonna read that now
(you know i start coding perl in train xD)
and what does "print map" ?

Page: 2 9 16 23 30 37 44 51 58 65 72 79 86 93 100 

IrcArchive