I am having difficulty creating a perl MongoDB delete statement that will select from EITHER one table or another, depending on the TYPE of input from the user. Let's say the databases are $FRUITS and each fruit is categorized into tables either by their 'fruit_names' or unique 'fruit_ids'
Let's say the user wants to delete an entry from the fruit_names table, how do I configure my perl code so that it can differentiate between one input versus another?
I've searched cpan.org and found some MongoDB documentation on delete_one and delete_many but I haven't been able to figure out how I would create a delete_one statement that would pull from either one table or the other, depending on the user's input.
I am a novice with perl still and I've never used MongoDB before, i've been really stuck on this for a while so any help would be greatly, greatly appreciated.
In reply to Creating a perl delete statement with MongoDB by e0s
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |