If that is causing problems for whatever reason you could do something like this (it is probably easier):
Create a new text file with your quotes inside like:
'This is quote one!',
'This is quote two!',
'This is quote three!'
'This is quote four!',
'This is quote five!'
];
Then in your code use:
my $random = $quotes->[rand @$quotes];
Then you have your random quote in $random
Create a new text file with your quotes inside like:
Code:
[ 'This is quote one!',
'This is quote two!',
'This is quote three!'
'This is quote four!',
'This is quote five!'
];
Then in your code use:
Code:
my $quotes = do "/path/to/new_file.txt" or die $!; my $random = $quotes->[rand @$quotes];
Then you have your random quote in $random